C#-发送电子邮件-STOREDRV.Submission.Exception:OutboundSpamException [英] C# - Sending Email - STOREDRV.Submission.Exception:OutboundSpamException

查看:332
本文介绍了C#-发送电子邮件-STOREDRV.Submission.Exception:OutboundSpamException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个小型实用程序,以帮助其每晚处理一些MySQL任务,并使其在失败时通过电子邮件发送给我的个人电子邮件(这是一个个人项目,因此没有公司的smtp服务器或任何东西,都是通过公开Outlook帐户发送电子邮件).

I am writing a small utility to help process some MySQL tasks every night and have it email my personal email if it fails (this is a personal project, so no company smtp server or anything, emails going through public outlook accounts).

我测试了大约5次,每次发送都成功,但是现在任何发送电子邮件的尝试都遇到了这个异常:

I tested about 5 times and each send was successful, but now any attempts to send email I get this exception:

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]

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在第六次尝试中就不会将其视为垃圾邮件-我可以在Outlook中做些什么来纠正此问题吗?

A bit of an oops on my part - didn't think Outlook would consider it as spam on the 6th try - is there anything I can do in Outlook to correct this?

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

I am using a service account I created in outlook to send these emails to my personal inbox.

有问题的实际代码:

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;
    }

}

推荐答案

我通过验证要使用的帐户来解决此问题.每次遇到此错误时,都会向该帐户发送一封电子邮件,其中包含有关解决该错误所需的说明.通常,您需要根据电话号码进行验证.

I resolved this by verifying the account I was trying to use. Each time you encounter this error an email is sent to the account with instructions on what you need to do to resolve the error. Typically you will need to verify against a phone number.

这篇关于C#-发送电子邮件-STOREDRV.Submission.Exception:OutboundSpamException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆