代码:
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
原因:
发送邮件在设置里开启服务:
原文地址:https://www.cnblogs.com/Vibge/p/9897594.html
时间: 2024-10-12 07:41:53