[导入]mailmessage发邮件

[导入]mailmessage发邮件
System.Web.Mail.MailMessage  Mailer = new System.Web.Mail.MailMessage();
Mailer.From = " [email protected]";
Mailer.To = " [email protected]";
Mailer.Subject ="发送测试";
Mailer.Body= "11111111111111111111111111111";
Mailer.Fields.Add(" http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
Mailer.Fields.Add(" http://schemas.microsoft.com/cdo/configuration/sendusername", "xxx");
Mailer.Fields.Add(" http://schemas.microsoft.com/cdo/configuration/sendpassword", "xxxx");
SmtpMail.SmtpServer = "smtp.sina.com.cn";
SmtpMail.Send(Mailer);
文章来源: http://www.cnblogs.com/wangdetian168/archive/2008/06/25/1229974.html

你可能感兴趣的:([导入]mailmessage发邮件)