0

我正在尝试从asp.net 登录页面发送注册电子邮件。但控制台显示此错误..

Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Mailbox unavailable. The server response was: Delivery is not allowed to this address. 

什么可能导致此错误、代码或stmp 服务器配置错误。我在不是我自己的商业服务器上托管。

4

1 回答 1

0

试试 yourClientName.DeliveryMethod = SmtpDeliveryMethod.Network;

例如:

SmtpClient client;
client = new SmtpClient("smtp.myserver.com", 25);

if (!string.IsNullOrEmpty(""))
{
     System.Net.NetworkCredential credential = new NetworkCredential("", "");
     client.Credentials = credential;
}
client.UseDefaultCredentials = true;
client.DeliveryMethod = SmtpDeliveryMethod.Network;

更多详情:http: //msdn.microsoft.com/en-us/library/system.net.mail.smtpdeliverymethod.aspx

于 2013-07-02T07:38:24.987 回答