public async Task SendNotificationAsync(IEmailNotification emailNotification) { await SendEmailAsync(new SendEmailDto { FromName = _emailConfiguration.SenderName, FromEmail = _emailConfiguration.SenderEmail, Subject = emailNotification.Subject, Recipients = emailNotification.Recipients, Text = emailNotification.Text, HtmlText = emailNotification.GetHtml() }); }
public Task SendAsync(IEmailNotification message) { if (message == null) { throw new ArgumentNullException(nameof(message)); } return(_emailService.SendAsync(new SendEmailDto { Subject = message.FormatSubject(), Recipients = message.Recipients, Text = message.Text, HtmlText = message.GetHtml() })); }