public async Task <Email> RenderSiteApprovedHibcEmailAsync(SiteApprovalEmailViewModel viewModel) { return(new Email ( from: PrimeEmail, to: MohEmail, subject: "Site Registration Approved", body: await _razorConverterService.RenderTemplateToStringAsync(RazorTemplates.Emails.SiteApprovedHibcEmailTemplate, viewModel) )); }
public async Task SendSiteApprovedHIBCAsync(Site site) { var viewModel = new SiteApprovalEmailViewModel { DoingBusinessAs = site.DoingBusinessAs, Pec = site.PEC }; var email = await _emailRenderingService.RenderSiteApprovedHibcEmailAsync(viewModel); await Send(email); }
public async Task SendSiteApprovedSigningAuthorityAsync(Site site) { var viewModel = new SiteApprovalEmailViewModel { DoingBusinessAs = site.DoingBusinessAs, Pec = site.PEC }; var email = await _emailRenderingService.RenderSiteApprovedSigningAuthorityEmailAsync(site.Provisioner.Email, viewModel); await Send(email); }
public async Task SendSiteApprovedPharmaNetAdministratorAsync(Site site) { var viewModel = new SiteApprovalEmailViewModel { DoingBusinessAs = site.DoingBusinessAs, Pec = site.PEC }; var email = await _emailRenderingService.RenderSiteApprovedPharmaNetAdministratorEmailAsync(site.AdministratorPharmaNet.Email, viewModel); await Send(email); }
public async void TestRender_SiteApprovalEmails(RazorTemplate <SiteApprovalEmailViewModel> template) { var service = CreateService(); var model = new SiteApprovalEmailViewModel { DoingBusinessAs = "dba", Pec = "pec" }; var html = await service.RenderTemplateToStringAsync(template, model); Assert.NotNull(html); Assert.Contains(model.DoingBusinessAs, html); // Not all emails contain the PEC despite sharing a View Model. }
public async Task <Email> RenderSiteApprovedPharmaNetAdministratorEmailAsync(string recipientEmail, SiteApprovalEmailViewModel viewModel) { return(new Email ( from: PrimeEmail, to: recipientEmail, subject: "Site Registration Approved", body: await _razorConverterService.RenderTemplateToStringAsync(RazorTemplates.Emails.SiteApprovedPharmaNetAdministratorEmailTemplate, viewModel) )); }