C#使用.net.mail配置163邮箱报错:不允许使用邮箱名称。 服务器响应为:authentication is required,smtp9,DcCowABHK4UYE11W2k6fAQ--.52196S2 1448940312

C#使用.net.mail配置163邮箱报错:不允许使用邮箱名称。 服务器响应为:authentication is required,smtp9,DcCowABHK4UYE11W2k6fAQ--.52196S2 1448940312,第1张

C#使用.net.mail配置163邮箱报错:不允许使用邮箱名称。


服务器响应为:authentication is required,smtp9,DcCowABHK4UYE11W2k6fAQ--.52196S2 1448940312

client.UseDefaultCredentials = true;

要放在

client.Credentials = new NetworkCredential("用户名", "密码");

的前面

var client = new SmtpClient()
{
UseDefaultCredentials = true,
Credentials = cre,
Host = CONSTANT.Host,
Port = CONSTANT.Port,
EnableSsl = false,
DeliveryMethod = SmtpDeliveryMethod.Network
};

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/589419.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-12
下一篇 2022-04-12

发表评论

登录后才能评论

评论列表(0条)

保存