public async Task SendNewAccountEmailAsync(Models.PasswordReset token, ClaimsPrincipal adminAccount, Uri baseUrl) { var account = token.Account; var recipient = new EmailContact { Address = account.Email, Name = account.Name }; await SendRazorEmailAsync(null, recipient, "Account Created", "AccountCreated", new AccountCreated { Name = account.Name, Recipient = recipient, CreatedBy = new EmailContact { Name = adminAccount.AccountName(), Address = adminAccount.AccountEmail() }, Token = token.Token, BaseUrl = baseUrl } ); }
public async Task SendPasswordResetEmailAsync(Models.PasswordReset token, Uri baseUrl) { var account = token.Account; await SendRazorEmailAsync(null, new EmailContact { Address = account.Email, Name = account.Name }, "Password reset", "PasswordReset", new Views.Emails.Models.PasswordReset { Name = account.Name, Token = token.Token, Email = account.Email, BaseUrl = baseUrl } ); }