I often had some troubles to use for sending mail goal with functions from contributors. All these functions use java class. With the java package jgmail, everything was all right from the first moment. The package jgmail has complete (i think) methods concerning POP3 and SMPT operations for all functionalities you could need in common with your mailbox.
Thanks for the library, I was wondering how the connection is done. In your example, you set the password and the username but how this information is actually passed to the SMTP server?