SmtpClient发送邮件
使用第三方SMTP服务器来发送邮件。如网易:
SmtpClient sc = new SmtpClient("smtp.126.com"); sc.Credentials = new NetworkCredential("用户名", "密码"); sc.Send("from@126.com", "to@qq.com", "主题", "邮件正文");
使用第三方SMTP服务器来发送邮件。如网易:
SmtpClient sc = new SmtpClient("smtp.126.com"); sc.Credentials = new NetworkCredential("用户名", "密码"); sc.Send("from@126.com", "to@qq.com", "主题", "邮件正文");