private async Task SendEmailsToAuthority(IEnumerable <string> emails, ApplicationDto applicationInfo, CancellationToken cancellationToken) { var content = await emailRendererService.RenderAuthorityContentAsync(applicationInfo, cancellationToken); var emailDto = new EmailDto() { EmailContent = content, ToMailAddresses = emails.Select(e => new MailAddress(e)).ToList() }; await smptService.SendEmailAsync(emailDto, cancellationToken); }
private async Task SendEmailToUserAsync(string email, ApplicationDto applicationInfoDto, CancellationToken cancellationToken) { var content = await emailRendererService.RenderPublishedApplicationContentAsync(applicationInfoDto, cancellationToken); var emailDto = new EmailDto() { EmailContent = content }; emailDto.ToMailAddresses.Add(new MailAddress(email)); await smptService.SendEmailAsync(emailDto, cancellationToken); }