[C#] C#发送HTML格式的邮件 →→→→→进入此内容的聊天室

来自 , 2019-08-03, 写在 C#, 查看 191 次.
URL http://www.code666.cn/view/94e70705
  1. MailMessage m = new MailMessage();
  2. m.From = new MailAddress("ir@w3mentor.com", "Raja Item");
  3. m.To.Add(new MailAddress("su@w3mentor.com", "Sekaran Uma"));
  4. m.Subject = "html email coming!";
  5.  
  6. //Specify an HTML message body
  7. m.Body = "<html><body><h1>Welcome</h1><br>This is an HTML message for sharejs.com.</body></html>"
  8. m.IsBodyHtml = True
  9.  
  10. // Send the message
  11. SmtpClient client = new SmtpClient("smtp.w3mentor.com");
  12. client.Send(m);
  13. //csharp/7758

回复 "C#发送HTML格式的邮件"

这儿你可以回复上面这条便签

captcha