public bool SendMailSimple(string To, string Subject, string Body)
{
if (To.Length == 0)
{
return false;
}
else
{
MailMessage Mail = new MailMessage();
Mail.From = new MailAddress(ConfigurationManager.AppSettings["NMailAddressFrom"], "");
Mail.To.Add(new MailAddress(To));
Mail.BodyEncoding = System.Text.Encoding.UTF8;
Mail.Subject = Subject;
Mail.IsBodyHtml = Convert.ToBoolean(ConfigurationManager.AppSettings["NMailIsBodyHtml"]);
Mail.Body = Body;
try
{
SmtpClient smtp = new SmtpClient(ConfigurationManager.AppSettings["NMailSMTPServerName"], ConfigurationManager.AppSettings["NMailSMTPServerPort"].ToSafeInt(0).Value);
smtp.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["NMa ...
Go to the complete details ...