【问题标题】:C# - Sending Email - STOREDRV.Submission.Exception:OutboundSpamExceptionC# - 发送电子邮件 - STOREDRV.Submission.Exception:OutboundSpamException
【发布时间】:2018-07-24 12:33:09
【问题描述】:

我正在编写一个小实用程序来帮助每晚处理一些 MySQL 任务,如果它失败,它会通过电子邮件发送我的个人电子邮件(这是一个个人项目,所以没有公司 smtp 服务器或任何东西,电子邮件通过公共 Outlook 帐户)。

我测试了大约 5 次,每次发送都成功,但现在任何发送电子邮件的尝试都会出现此异常:

Error sending test email: Transaction failed. The server response was: 5.2.0 STOREDRV.Submission.Exception:OutboundSpamException; Failed to process message due to a permanent exception with message WASCL UserAction verdict is not None. Actual verdict is Suspend, ShowTierUpgrade. OutboundSpamException: WASCL UserAction verdict is not None. Actual verdict is Suspend, ShowTierUpgrade.[Hostname=BY2PR0101MB1461.prod.exchangelabs.com]

我有点不好意思 - 没想到 Outlook 在第 6 次尝试时会将其视为垃圾邮件 - 我可以在 Outlook 中做些什么来纠正这个问题?

我正在使用我在 Outlook 中创建的服务帐户将这些电子邮件发送到我的个人收件箱。

有问题的实际代码:

class JobMailer
{
    private string email_to;
    private string email_from;
    private string password;
    private string email_smtp;
    private bool use_ssl;
    private int port;

    public void Send(string subject, string body)
    {
        MailMessage mail = new MailMessage(email_from, email_to);
        using (SmtpClient client = new SmtpClient
        {
            DeliveryMethod = SmtpDeliveryMethod.Network,
            UseDefaultCredentials = false,
            EnableSsl = use_ssl,
            Host = email_smtp,
            Timeout = 100000,
            Port = port,
            Credentials = new NetworkCredential(email_from, password)
        })
        {
            mail.Subject = subject;
            mail.Body = body;
            client.Send(mail);
        }


    }

    public JobMailer(string emailTo, string smtp, string emailFrom, string pw, int p, bool ssl)
    {
        email_to = emailTo;
        email_from = emailFrom;
        password = pw;
        email_smtp = smtp;
        port = p;
        use_ssl = ssl;
    }

}

【问题讨论】:

  • 您是否正确使用 SSL 进行身份验证?我还听说 Outlook 对使用免费帐户发送的自动邮件很挑剔。我建议完全使用其他东西
  • @Igneous01 所以我在使用 nodemailer 时遇到了同样的问题。我已经用outlook确认了电子邮件,虽然电子邮件发送了,但我仍然收到此错误。阅读您的帖子后,我检查了收件箱,但没有看到来自 Outlook 的新确认电子邮件。您知道前景政策是否有任何变化?

标签: c# outlook smtp


【解决方案1】:

我通过验证我尝试使用的帐户解决了这个问题。每次您遇到此错误时,都会向该帐户发送一封电子邮件,其中包含有关您需要采取哪些措施来解决该错误的说明。通常,您需要根据电话号码进行验证。

【讨论】:

  • Fwiw,我必须验证两次——第一次让我以编程方式发送消息,然后几天后在开发过程中我遇到了某种限制并收到了描述的 OutboundSpamException在这里,不得不再次验证(相同的电话号码有效)。有点担心 Outlook 不会喜欢为网站注册发送大量确认电子邮件,即“验证要求何时结束”?预计ShowTierUpgrade 意味着我被推销给能够发送大量电子邮件的东西,但这只是重新验证。 /耸肩
猜你喜欢
  • 2016-04-17
  • 2012-07-27
  • 2020-05-23
  • 2013-06-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多