public Task SendAsync(MailMessage mail, bool normalize = true) { Configure(); EmailMessage message = new EmailMessage(_exchangeService); message.CreateContent(mail, normalize); return(Task.Run(() => message.Send())); }
public void Send(MailMessage mail, bool normalize = true) { Configure(); EmailMessage message = new EmailMessage(_exchangeService); message.CreateContent(mail, normalize); message.Send(); }
public Task SendAsync(string to, string subject, string body, bool isBodyHtml) { Configure(); EmailMessage message = new EmailMessage(_exchangeService); message.ToRecipients.Add(to); message.CreateContent(subject, body, isBodyHtml); return(Task.Run(() => message.Send())); }
public void Send(string to, string subject, string body, bool isBodyHtml = true) { Configure(); EmailMessage message = new EmailMessage(_exchangeService); message.ToRecipients.Add(to); message.CreateContent(subject, body, isBodyHtml); message.Send(); }