MailMessage msg = new MailMessage(); msg.From = new MailAddress("xxxx@xxxx.com","xxxxxxxxxx"); msg.To.Add("xxx@xxx.com"); // Who's it to msg.Subject = "Subject line"; msg.Body = "<html><h1>Big header</h1><p>And some smaller text</p></html>"; msg.IsBodyHtml = true; // Delivery notifications msg.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure | DeliveryNotificationOptions.OnSuccess | DeliveryNotificationOptions.Delay; SmtpClient smtp = new SmtpClient("xxxxxxxxx"); // Using authentication to connect to above smtp server to send email. // Replace txtSMTPUser and txtSMTPPass with your appropriate details. /*System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential("xxxx@xxxxx", "xxxxxxx"); smtp.UseDefaultCredentials = false; smtp.Credentials = SMTPUserInfo;*/ smtp.Send(msg);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)