MySQL
- 3 ответа
- 0 вопросов
7
Вклад в тег
var smtpClient = new SmtpClient();
var fromAddress = new MailAddress("from@email.ru");
var toAddress = new MailAddress("to@email.ru");
var mail = new MailMessage(fromAddress, toAddress)
{
IsBodyHtml = true,
Subject = "TestTest"
};
var htmlView = AlternateView.CreateAlternateViewFromString("html-код письма", Encoding.UTF8, "text/html");
mail.AlternateViews.Add(htmlView);
smtpClient.EnableSsl = false;
smtpClient.Send(mail);