forked from ddrilling/AsbCloudServer
26 lines
836 B
C#
26 lines
836 B
C#
using System.Net.Mail;
|
|
|
|
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 = "<html><boby><H1>this is a test text</H1></boby></html>";
|
|
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);
|
|
}
|
|
}
|
|
}
|