简体   繁体   English

邮件发送错误-SMTPAddressFailedException

[英]Mail sending error - SMTPAddressFailedException

I am using a linux server to run my application on Tomcat, and it's sending email, but getting the following error 我正在使用Linux服务器在Tomcat上运行我的应用程序,并且正在发送电子邮件,但出现以下错误

by looking at this log I couldn't find where exactly the issue is, any suggestions??? 通过查看此日志,我找不到确切的问题所在,有什么建议吗???

15/12/2010 06:00:32 [MIS] ERROR [Thread-7] MailSendingThread.sendMail(155) | Could not send mail
org.springframework.mail.MailSendException: Failed messages: javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
 com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
;
  nested exception is:
 com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
; message exception details (1) are:
Failed message 1:
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
 com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
;
  nested exception is:
 com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

 at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1294)
 at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:635)
 at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:416)
 at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
 at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
 at com.edc.common.service.MailSendingThread.sendMail(MailSendingThread.java:196)
 at com.edc.common.service.MailSendingThread.sendMail(MailSendingThread.java:147)
 at com.edc.common.service.MailSendingThread.run(MailSendingThread.java:126)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
;
  nested exception is:
 com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

 at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1145)
 ... 7 more
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Checklist 检查清单

1.Check on which host mail server is running. 1.检查在哪个主机邮件服务器上运行。 If its running on local machine, set host address as 0.0.0.0 如果它在本地计算机上运行,​​请将主机地址设置为0.0.0.0

2.If in case of external mail server, check the mail credentials ie, user email and password 2.如果是外部邮件服务器,请检查邮件凭据,即用户电子邮件和密码

553是来自服务器的“中继被拒绝错误”,即您没有提供正确的凭据(在这种情况下,它似乎是您的电子邮件地址)。

It looks like you're using the spring framework to send your mails. 看来您正在使用spring框架发送邮件。 Please also check that you have activated authentication with the mail.smtp.auth property : 另请检查您是否已使用mail.smtp.auth属性激活身份验证:

<bean id="mailsender" class="org.springframework.mail.javamail.JavaMailSenderImpl" >
  <property name="javaMailProperties">
    <props>
      <prop key="mail.smtp.auth">true</prop>
    </props>
  </property>
  <property name="host" value="smtp.server.com" />
  <property name="username" value="your.smtp.user" />
  <property name="password" value="your.smtp.password" />
</bean>

您似乎正在尝试将电子邮件发送到受电子邮件服务器限制的地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM