Solution To SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS

In case you encounter this error message when using JavaMail to connect to, say, GMail’s SMTP server, there is one property that needs to be present, mail.smtp.starttls.enable = true.

If, however the same error message persists, the following properties need to be added in order for this to work.

  • mail.smtp.socketFactory.port = 465
  • mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
  • mail.smtp.socketFactory.fallback = false

There, that should fix that annoying STARTTLS error message using JavaMail.

Related Posts Plugin for WordPress, Blogger...

2 comments

Leave a Reply

Your email address will not be published. Required fields are marked *