Example #1
0
        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
            }
                                      );
        }