C#发送HTML格式的邮件
MailMessage m = new MailMessage(); m.From = new MailAddress("ir@w3mentor.com", "Raja Item"); m.To.Add(new MailAddress("su@w3mentor.com", "Sekaran Uma")); m.Subject = "html email coming!"; //Specify an HTML message body m.Body = "<html><body><h1>Welcome</h1><br>This is an HTML message for 75271.com.</body></html>" m.IsBodyHtml = True // Send the message SmtpClient client = new SmtpClient("smtp.w3mentor.com"); client.Send(m);