using System; using System.Collections.Generic; using System.Linq; using System.Net.Mail; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { public static class SendMail { public static void Main() { MailAddress to = new MailAddress("ng.frolov@autodrilling.ru"); MailAddress from = new MailAddress("bot@autodrilling.ru"); MailMessage message = new MailMessage(from, to); message.Subject = "Using the new SMTP client."; message.Body = "

this is a test text

"; message.IsBodyHtml = true; SmtpClient client = new SmtpClient("smtp.timeweb.ru"); client.EnableSsl = true; client.UseDefaultCredentials = false; client.Credentials = new System.Net.NetworkCredential("bot@autodrilling.ru", "xHhgwZ4D"); client.Send(message); } } }