问题描述
当使用JavaMail发送邮件时,我收到以下错误。它是不寻常的,因为它一直工作到现在为止,没有任何改变。
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)
我看了一下:
不是完全相同的错误消息,但这不应该为您的情况有所作为。
It's not the exact same error message but that shouldn't make a difference for your case.
所以只需确保将其设置为您的邮件服务器接受的东西。检查文档,配置或您的本地邮政主管,因为我不能告诉你这是什么。可能你只是发送被拒绝的localhost。尝试将其设置为实际解析为IP地址的主机名(如果可能)。
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).
这篇关于JavaMail中的HELO名称无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!