当前位置: 技术问答>java相关
javamail发件人和收件人不能相同吗?看下面的代码
来源: 互联网 发布时间:2015-04-08
本文导语: testmail.jsp: To: From: Send Password: Subject: Message: sendmail.jsp: JSP meets JavaMail, what a sweet combo. Your mail has been sent. 发给其他人挺正常的,可是发送给自己就出现错误,怎么回...
testmail.jsp:
To:
From:
Send Password:
Subject:
sendmail.jsp:
JSP meets JavaMail, what a sweet combo.
发给其他人挺正常的,可是发送给自己就出现错误,怎么回事?
javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 : Invalid User, it is the same as the mail from user
To:
From:
Send Password:
Subject:
Message:
sendmail.jsp:
JSP meets JavaMail, what a sweet combo.
Your mail has been sent.
发给其他人挺正常的,可是发送给自己就出现错误,怎么回事?
javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 : Invalid User, it is the same as the mail from user
|
好象不是JAVAMAIL的事吧,是SMTP服务器发回来的信息,是SMTP服务器不准自己发给自己!!
javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 : Invalid User, it is the same as the mail from user
javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 : Invalid User, it is the same as the mail from user
|
就算不能相同也是JAVAMAIL包的问题,它里面肯定进行了检验!
你可以试着重写它的!
你可以试着重写它的!
|
可以相同的!!至于异常可能是其他原因!
|
你换个信箱试试
|
You can send mail to yourself, any question please reference to,
http://www.csdn.net/expert/topic/547/547033.xml
http://www.csdn.net/expert/topic/547/547033.xml