Example #1
0
 public static async Task SendMailAsync(EmailModel model)
 {
     using (var mail = BuildMail(model))
         using (var smtp = BuildSmtp(model))
             await smtp.SendMailAsync(mail);
 }
Example #2
0
 public static void SendMail(EmailModel model)
 {
     using (var mail = BuildMail(model))
         using (var smtp = BuildSmtp(model))
             smtp.Send(mail);
 }