码迷,mamicode.com
首页 > 其他好文 > 详细

com.sun.mail.smtp.SMTPSendFailedException: 553 Mail from must equal authorized user

时间:2017-06-04 23:02:40      阅读:321      评论:0      收藏:0      [点我收藏+]

标签:而在   span   邮件   class   ack   data   cep   post   size   

1、错误描写叙述

553 Mail from must equal authorized user
com.sun.mail.smtp.SMTPSendFailedException: 553 Mail from must equal authorized user

	at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1333)
	at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:906)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:535)
	at com.you.mail.model.SendMessage.sendMessage(SendMessage.java:71)
	at com.you.mail.model.SendMessage.main(SendMessage.java:89)
Exception in thread "main" com.sun.mail.smtp.SMTPSendFailedException: 553 Mail from must equal authorized user

	at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1333)
	at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:906)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:535)
	at com.you.mail.model.SendMessage.sendMessage(SendMessage.java:71)
	at com.you.mail.model.SendMessage.main(SendMessage.java:89)

2、错误原因

     因为在做邮件发送时,登录用户和发信人必须一致。而在測试时我登录用户的邮箱是163邮箱,发信人邮箱是QQ邮箱。导致报错


3、解决的方法

     保证登录人邮箱跟发信人邮箱一致,要么都用163邮箱,要么都用QQ邮箱

com.sun.mail.smtp.SMTPSendFailedException: 553 Mail from must equal authorized user

标签:而在   span   邮件   class   ack   data   cep   post   size   

原文地址:http://www.cnblogs.com/zsychanpin/p/6942071.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!