首页 > Web开发 > 详细

.Net邮件发送,报错mail from address must be same as authorization

时间:2018-11-02 18:22:59      阅读:179      评论:0      收藏:0      [点我收藏+]

代码:

SmtpClient smtpClient = new SmtpClient();

smtpClient.EnableSsl = true;

smtpClient.UseDefaultCredentials = false;

smtpClient.Host = "smtp.esmail.qq.com";

smtpClient.Port = "25";

smtpClient.Credentials = new System.Net.NetWorkCredential(发送邮件的邮箱,安全码);

smtpClient.Send(msg);

报错:

mail from address must be same as authorization

原因:

发送邮件在设置里开启服务:

技术分享图片

 

.Net邮件发送,报错mail from address must be same as authorization

原文:https://www.cnblogs.com/Vibge/p/9897594.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!