MailMessage m = nowy MailMessage ();
m.From = nowy MailAddress ([od adres emaila], [nadawca wymieniać]);
m.To.Add (emailAddressSendingTo);
m.Subject = temat;
m.Body = ciało;
m.IsBodyHtml = true;
m.ReplyTo = nowy MailAddress (replyToEmailAddress);
SmtpClient smtpc = nowy SmtpClient ();
smtpc. Gospodarz = "ExchangeServerIP";
smtpc. Referencje = nowy System.Net.NetworkCredential (employeeNetworkAccount, employeeNetworkPassword, DomainName);
smtpc. Wysyłać (m);
|