I am using a linux server to run my application on Tomcat, and it's sending email, but getting the following error
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 rcpt开发者_开发知识库hosts (#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. If its running on local machine, set host address as 0.0.0.0
2.If in case of external mail server, check the mail credentials i.e., user email and password
553 is "relay denied error" from server, that is you have not provided correct credential (in this case it seems to be with your email address).
It looks like you're using the spring framework to send your mails.
Please also check that you have activated authentication with the mail.smtp.auth
property :
<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>
It looks like you are trying to send email to an address which has been restricted by the email server.
精彩评论