使用SmtpClient发送邮件的时候,出现了如题错误. 解决方案: 将 SmtpClient.UseDefaultCredentials 属性设置为 true . 官方文档说明: Some SMTP servers require that the client be authenticated before the server sends e-mail on its behalf. Set this property to truewhen this SmtpClient obje…
引用: using System.Net.Mail; public class EmailHelper { public static bool SendEmail(string title, string body, string address) { try { MailAddress from = new MailAddress("xxx@xxx.com", "xxx"); //发送源邮箱地址和名称 MailAddress to = new MailAddre…