Пример #1
0
 public async Task SendMessage(string destination, string message)
 {
     var from        = new MailAddress($"noreply@{_host}", null, Encoding.UTF8);
     var to          = new MailAddress(destination);
     var mailMessage = new MailMessage(from, to)
     {
         Body = message
     };
     await _smtpClient.SendMessage(mailMessage);
 }