Exemplo n.º 1
0
 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()
     });
 }
Exemplo n.º 2
0
        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()
            }));
        }