Beispiel #1
0
    /// <summary>
    /// For more info on sending mail with Cofoundry see https://www.cofoundry.org/docs/framework/mail
    /// </summary>
    private async Task SendWelcomeNotification(RegisterMemberAndLogInCommand command)
    {
        var welcomeEmailTemplate = new NewUserWelcomeMailTemplate();

        welcomeEmailTemplate.Name = command.DisplayName;
        await _mailService.SendAsync(command.Email, welcomeEmailTemplate);
    }
Beispiel #2
0
        private NewUserWelcomeMailTemplate MapEmailTemplate(AddUserCommand user)
        {
            var template = new NewUserWelcomeMailTemplate();

            template.FirstName         = user.FirstName;
            template.LastName          = user.LastName;
            template.TemporaryPassword = new HtmlString(user.Password);

            return(template);
        }
        private NewUserWelcomeMailTemplate MapEmailTemplate(AddUserCommand user, GeneralSiteSettings siteSettings)
        {
            var template = new NewUserWelcomeMailTemplate();

            template.FirstName         = user.FirstName;
            template.LastName          = user.LastName;
            template.TemporaryPassword = new HtmlString(user.Password);
            template.ApplicationName   = siteSettings.ApplicationName;

            return(template);
        }