1.1的pop方式
System.Web.Mail.MailMessage msg=new MailMessage();
msg.BodyEncoding=System.Text.Encoding.GetEncoding("gb2312");
msg.BodyFormat=MailFormat.Text;
msg.From="cbw123_1984@163.com";
msg.Subject="测试程序";
msg.To="cbw123_1984@163.com";
msg.Body="hello,world!";
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "cbw123_1984"); //set your username here
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "test"); //set your password here
SmtpMail.SmtpServer = "smtp.163.com";
System.Web.Mail.SmtpMail.Send(msg);
2.0的pop方式
public static void SendSMTPEMail(string strSmtpServer, string strFrom,
string strFromPass, string strto, string strSubject, string strBody)
http://www.csharphelp.com/archives2/archive450.html