Ejemplo n.º 1
0
        private string BuildPasswordRecoveryMail(Account account)
        {
            var token       = GeneratePasswordRecoveryToken(account.Email);
            var link        = string.Concat(_appSettings.ApiConfig.PasswordRecoveryAPI, token);
            var templateKey = nameof(_appSettings.EmailTemplateConfig.PasswordRecoveryMailContent);
            var template    = _appSettings.EmailTemplateConfig.PasswordRecoveryMailContent;
            var content     = RenderedEmailHelper.Parse(templateKey, template, new TemplateModel {
                Link = link
            });

            return(content);
        }
Ejemplo n.º 2
0
        private string BuildAccountActivationMail(Account account)
        {
            var token       = GenerateAccountActivationToken(account);
            var link        = string.Concat(_appSettings.ApiConfig.AccountActivationAPI, token);
            var templateKey = nameof(_appSettings.EmailTemplateConfig.SignUpMailContent);
            var template    = _appSettings.EmailTemplateConfig.SignUpMailContent;
            var content     = RenderedEmailHelper.Parse(templateKey, template, new TemplateModel {
                Link = link
            });

            return(content);
        }