public static void Send(string[] To, String Subject, String Body,bool IsBodyHtml)
{
try
{
var smtp = new SmtpClient
{
Host = Host,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
Credentials = new NetworkCredential(SMTPUser, Password),
};
var message = new MailMessage()
{
Subject = Subject,
Body = Body
};
foreach (var vv in (from s in To select (new MailAddress(s))))
{
message.To.Add(vv);
}
message.From = new MailAddress(From);
message.IsBodyHtml = IsBodyHtml;
smtp.Send(message);
}
catch
{
}
}