public void SendSMTPEMail(string strSmtpServer, string strFrom, string strFromPass, string strto, string strSubject, string strBody)
{
System.Net.Mail.SmtpClient client = new SmtpClient(strSmtpServer);
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential(strFrom, strFromPass);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
System.Net.Mail.MailMessage message = new MailMessage(strFrom, strto, strSubject, strBody);
message.BodyEncoding = System.Text.Encoding.UTF8;
message.IsBodyHtml = true;
client.Send(message);
//第台?一?个?参?数簓如?果?是?163邮?箱?就í写′smtp.163.com strSmtpServer
//第台?二t个?参?数簓发ぁ?件t人?的?帐ê号? strFrom
//第台?三▂个?参?数簓发ぁ?件t人?密ü码? strFromPass
//第台?四?个?参?数簓收?件t人?帐ê号? strto
//第台?五?个?参?数簓主÷题琣 strSubject
//第台?六ⅷ?个?参?数簓内ú容╕ strBody
}
SendSMTPEMail("smtp.qq.com", "自己邮箱", "密码", "注册邮箱", "查é看′是?否?成é功|", "我ò做?出?来ぁ?了?");