更新时间:2022-04-10 07:38:57
我有这个问题和认证固定如下所示:
I had this issue and authenticating fixed it see below:
SmtpClient client = new SmtpClient(EmailServer, 25);
var SmtpUser = new System.Net.NetworkCredential("domain\\username", "password");
client.Credentials = SmtpUser;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
我不得不使用双斜杠,因为一个斜杠是转义字符,所以使用两个它来工作。
I had to use the double slash since one slash is the escape character so use two for it to work.