vs2005里jmail发送出错大家来看看
asp.net 2.0 的
代码如下
Message mailMsg = Server.CreateObject( "JMail.Message ") as Message;
mailMsg.From = "faefaf@163.com ";
mailMsg.AddRecipient( "fsefsdf@163.com ", null, null);
mailMsg.Logging = true;
mailMsg.MailServerUserName = "fesf ";//这里用加上 @163.com 么?
mailMsg.MailServerPassWord = "sdfge ";
mailMsg.Subject = "title ";
mailMsg.Silent = true;
mailMsg.Body = "body ";
mailMsg.Encoding = "gb2312 ";
bool result = mailMsg.Send( "stmp.163.com ", false);
错误是
The message was undeliverable. All servers failed to receive the message
.execute()
{
Trying server mail:stmp.163.com
stmp.163.com failed with the message: "WSAGetLastError() returned 11004, No Data; perhaps no route to host "
No socket for server. ConnectToServer()
1 of 1 servers failed
}
errorsource 是 SMTPConnect()
帮忙拉:)
------解决方案--------------------bool result = mailMsg.Send( "stmp.163.com ", false);
改成
bool result = mailMsg.Send( "smtp.163.com ", false);
------解决方案--------------------是SMTP
------解决方案--------------------我也用了Jmail,但是发送只返回false啊,到底是什么意思啊,关注楼主。
------解决方案--------------------拼写问题