简体   繁体   English

时间:2019-05-10标签:asp.netSystem.Net.Mail.SmtpFailedRecipientException

[英]c# asp.net System.Net.Mail.SmtpFailedRecipientException

I've a problem. 我有问题 I was sending newsletters to my users, I've more of 10000 email addresses. 我正在向用户发送新闻通讯,我有10000多个电子邮件地址。 When i tried to send it with only 6/7 email it worked, now it doesn't work anymore. 当我尝试仅以6/7电子邮件发送它时,它已经起作用了,现在它不再起作用了。 Why? 为什么? I receive this error: 我收到此错误:

Exception Details: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. 异常详细信息:System.Net.Mail.SmtpFailedRecipientException:邮箱不可用。 The server response was: 5.1.1 Too many bad domains 服务器响应为:5.1.1坏域太多

[SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.1.1 <rsv1979@yahoo.com> Too many bad domains]

[SmtpFailedRecipientsException: Unable to send to a recipient.]
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1648
   Admin_InviaNewsLetter.SendEmailButton_Click(Object sender, EventArgs e) +3013
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

I can't understand why! 我不明白为什么! If u need the code, here it is: 如果您需要代码,则为:

for (int i = 0; i < 501; i++)
    {
        destinatario = HttpUtility.HtmlDecode(Convert.ToString(Convert.ToString(dt.Rows[i][0])));
        msg.To.Add(destinatario);
    }
    string body = HttpUtility.HtmlDecode(BodyMessageTextBox.Text);
    msg.From = new MailAddress("email@address.it");
    msg.Subject = HttpUtility.HtmlDecode(ObjectTextBox.Text);
    msg.IsBodyHtml = true;
    msg.Body = pzzsopra + body + pzzsotto;
    SmtpClient sc = new SmtpClient("smtp.sitedomain.it");
    sc.Port = 25;
    sc.Credentials = new NetworkCredential("email@address.it", "");
    sc.EnableSsl = false;
    sc.Send(msg);

I hope to find the solution. 我希望找到解决方案。 Thank you before! 谢谢你!

This could be a problem with that email address, in which case your loop logic needs to handle such errors, forget that one and proceed onwards. 该电子邮件地址可能存在问题,在这种情况下,您的循环逻辑需要处理此类错误,请忘记该错误并继续进行。 However it might be that your domain is blacklisted by the recipient mail server (or their infrastructure). 但是,收件人邮件服务器(或其基础结构)可能会将您的域列入了黑名单。

Try this for starters - http://www.aweber.com/blog/email-deliverability/whitelisting-feedback-loops.htm 初学者可以尝试一下-http: //www.aweber.com/blog/email-deliverability/whitelisting-feedback-loops.htm

In my experience, it's better to use a trusted 3rd party to send bulk emails. 以我的经验,最好使用受信任的第三方发送大量电子邮件。 Try mailchimp or google for 'email campaign software' / 'email newsletter software' - there are lots of providers, most of which have API's your ASP.NET site can talk to. 尝试使用mailchimp或google来获取“电子邮件活动软件” /“电子邮件新闻通讯软件”-许多提供商,其中大多数都具有您ASP.NET网站可以与之通信的API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM