首先设置自己的邮箱 设置 账号
吧这些全部选中就可以了
POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务
public static void Sender() { try { SmtpClient client = new SmtpClient(); client.Host = "smtp.qq.com"; MailMessage mm = new MailMessage(); client.Port = 25; mm.From = new MailAddress("873113580@qq.com"); mm.To.Add(new MailAddress("625903917@qq.com")); mm.Subject = "Hello~!"; mm.Body = "hahahahaa "; mm.IsBodyHtml = false; mm.Priority = MailPriority.High; client.Credentials = new NetworkCredential("873113580@qq.com", "*******"); client.Send(mm); } catch (Exception ex) { Console.WriteLine(ex.Message); } }