日期:2014-05-20  浏览次数:21203 次

javaMail连结Exchange邮箱发邮件报错
javaMail版本1.4
如果通过javaMail向内部的exchange邮箱发邮件是能发出去的.但是如果向163,QQ等邮箱发邮件的话会报以下错误
DEBUG SMTP: Sending failed because of invalid destination addresses
RSET
250 2.0.0 Resetting
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at com.smartdot.mau.mail.MailSend.sendHtmlMail(MailSend.java:308)
at com.smartdot.mau.thread.SendMailThread.run(SendMailThread.java:34)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
... 6 more
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at com.smartdot.mau.mail.MailSend.sendHtmlMail(MailSend.java:308)
at com.smartdot.mau.thread.SendMailThread.run(SendMailThread.java:34)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
... 6 more
谁知道原因啊?在线等....
javaMail

------解决方案--------------------
参考:https://confluence.atlassian.com/display/JIRAKB/550+5.7.1+Unable+to+Relay+Mail+From+Exchange+Server