500 5.3.3无法识别的命令“未知” [TY1PR01CA0186.jpnprd01.prod.outlook.com]错误

问题描述

当我使用Microsoft OAuth + Outlook SMTP服务器发送电子邮件时,发生5.3.3无法识别的命令“未知” [TY1PR01CA0186.jpnprd01.prod.outlook.com]错误

SMTP服务器似乎没有问题,因为当我发送不带OAuth的电子邮件时便发送了电子邮件

这是API权限。 enter image description here

            SmtpServer eaSMTPServer = new SmtpServer("smtp.office365.com");
            eaSMTPServer.ConnectType = SmtpConnectType.ConnectSSLAuto;
            eaSMTPServer.Port = 587;
            eaSMTPServer.AuthType = SmtpAuthType.XOAUTH2;
            eaSMTPServer.User = authenTicationEmail;
            eaSMTPServer.Password = accesstoken;

            SmtpMail oMail = new SmtpMail("TryIt");
            oMail.From = authenTicationEmail;
            oMail.To = to;

            oMail.Subject = subject;
            oMail.TextBody = message;

            SmtpClient oSmtp = new SmtpClient();
            oSmtp.SendMail(eaSMTPServer,oMail);

我该如何解决这个问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)