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);
        }
Esempio n. 2
0
        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);
        }