.net1.1下邮件发送(带验证)
- 作者:zhaozj
- 发表时间:2020-12-23 10:40
- 来源:未知
?????? MailMessage mail = new MailMessage();?????? mail.To = greystar@jbinfo.com.cn;?????? mail.From = "greystar@jbinfo.com.cn;";?????? mail.Subject = "Test";?????? mail.Body = "TestBody";?????? mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication?????? mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "my_username_here"); //set your username here????? mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "super_secret"); //set your password here
??? SmtpMail.SmtpServer = "mail.eqing.org";? //your real server goes here??? SmtpMail.Send( mail );