MailMessage message = new MailMessage(); message.From = new MailAddress("from"); message.To.Add("to"); message.Subject = "Test mail"; message.Body = " This is a test "; message.IsBodyHtml = true; string smtpUrl = web.Site.WebApplication.OutboundMailServiceInstance.Server.Address; SmtpClient smtp = new SmtpClient(smtpUrl); smtp.Send(message);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)