首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

WSAGetLastError() returned 11004, No Data; perhaps no route to host

2014-01-28 
asp.net 2.0 的 代码如下 Message mailMsg Server.CreateObject( JMail.Message ) as Message mailMsg

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啊,到底是什么意思啊,关注楼主。

        

热点排行