public void myEmail(string sendTo, string sendFrom, string subjct,string bdy, string pass) { SmtpClient smtp = new SmtpClient("127.0.0.1",25); MailAddress to = new MailAddress(sendTo); MailAddress from = new MailAddress(sendFrom); MailMessage message = new MailMessage(sendFrom, sendTo); message.Subject = subjct; message.Body = bdy; smtp.Timeout = 50000; smtp.EnableSsl = true; smtp.Credentials = new System.Net.NetworkCredential(sendFrom, pass); smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)