Can you attach netbeans project to this thread (click "Go Advanced" button at the right of "Post Quick Reply" button and add zip file of your project there.)? We can test the project here too.
Note that some email servers only allows secure connection (e.g. gmail) and you might need to enable pop3/smtp for those servers (e.g. for gmail, you need to activate these from your options panel).
You can also try the programs below:
Java Tips - Other API Tips
I had tried "Connecting GMail using POP3 connection with SSL" example there before. It should work.