I'm getting the following error when using JavaMail to send mails. Its unusual because its been working for sometime until now and no changes have been made.
550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
com.sun.mail.smtp.SMTPSendFailedException: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
I have take a look at the RFC doc but unsre how to translate its meaning to the JavaMail properties.
Any ideas why and any solutions are appreciated.
From JavaMail API FAQ:
It's not the exact same error message but that shouldn't make a difference for your case.
So just make sure to set it to something your mail server accepts. Check docs, config or your local postmaster as I can't tell you what that is. Probably you're just sending "localhost" which is denied. Try setting it to a hostname that actually resolves to your IP address (if possible).