.net自带的mail组件MailMessage mail = new MailMessage();
.net自带的mail组件mail.From 
= "发送者的Email";
.net自带的mail组件mail.To 
= "接收者的Email";
.net自带的mail组件mail.Subject 
= "主题";
.net自带的mail组件mail.Body 
= "内容";
.net自带的mail组件mail.BodyFormat 
= MailFormat.Html;//用html格式
.net自带的mail组件
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate""1"); //basic authentication
.net自带的mail组件
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername""邮箱用户名"); //set your username here
.net自带的mail组件
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword""邮箱密码"); //set your password here
.net自带的mail组件
SmtpMail.SmtpServer = "smtp.126.com";//这里写邮局地址
.net自带的mail组件
SmtpMail.Send(mail);

相关文章:

  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2022-01-06
  • 2022-02-14
  • 2022-01-29
  • 2021-09-14
  • 2021-08-23
猜你喜欢
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2021-05-18
  • 2021-05-27
  • 2021-10-21
  • 2022-12-23
相关资源
相似解决方案