Answer the question
In order to leave comments, you need to log in
How to send mail through ASP.NET?
How can I find out if my hosting has a mail server?
If that hosting: https://somee.com tariff is free!
Is it cheers?
How to use it?
I'm expecting a PHP-like solution with one function: email(to, subject, body);
Answer the question
In order to leave comments, you need to log in
var smtpClient = new SmtpClient();
var fromAddress = new MailAddress("[email protected]");
var toAddress = new MailAddress("[email protected]");
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);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question