private void SendMail() { MailMessage mail = new MailMessage(); mail.From = new MailAddress(txtEmail.Text.Trim()); mail.To.Add("mailid"); mail.Subject = txtSubject.Text.Trim(); mail.IsBodyHtml = true; mail.Body = GetBody(); SmtpClient smtpClient = new SmtpClient(); smtpClient.Host = "relay-hosting.secureserver.net";//smtpout.secureserver.net smtpClient.Port = 25; smtpClient.UseDefaultCredentials = false; smtpClient.Credentials = new NetworkCredential("mailid", "password"); smtpClient.Timeout = 20000; smtpClient.Send(mail); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)