private async Task ProcessBlast(Template template, Customer customer, List <EmailRecipient> recipients, CancellationToken cancellationToken) { foreach (var recipient in recipients) { if (recipient.Email == null) { _logger.LogWarning($"Could not deliver email to recipient {recipient.Name}: no email address"); continue; } var mailMessage = new MailMessage("*****@*****.**", recipient.Email) { Body = await _templateEngine.MergeTemplate(template, customer, recipient, cancellationToken), IsBodyHtml = true }; await _smtpClient.SendMailAsync(mailMessage); } }