Sep 11, 2008

Java Mail: Make sure the mail.smtp.auth property's value is a String...

If you are using the JavaMail API to send out e-mail via an e-mail server that requires authentication and are getting an error like com.sun.mail.smtp.SMTPSendFailedException: 550 You must authenticate, make sure the mail.smtp.auth property is assigned as a String, like this:

  1.   properties.put( "mail.smtp.auth", "true" );

Not exactly the most obvious bug to find...

Filed In