Content-Type: text/html; charset="utf-8"
SmtpClient cl = new SmtpClient(); cl.ServerName = "your server name"; cl.Port = 25; cl.Ssl = false; SmtpMessage mg = new SmtpMessage(); mg.Subject = "Html mail test"; mg.From = "my_address@mail.com"; mg.To.Add(new MailAddress("address@mail.com")); //Send by HTML format SmtpContent ct = new SmtpContent(); ct.LoadHtml("<html><head></head><body>......</body></html>"); mg.Contents.Add(ct); var rs = cl.SendMail(mg); //Check mail was sent or not if (rs.SendSuccessfull == false) { //You can get information about send mail is success or error reason var resultState = rs.State; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)