Example #1
0
        public async Task <string> GenerateConfirmSmsText(SmsConfirmationData confirmationDataData)
        {
            var templateVm = new SmsConfirmationTemplate
            {
                ConfirmationCode = confirmationDataData.ConfirmationCode
            };

            return(await _templateGenerator.GenerateAsync("SmsConfirmation", templateVm, TemplateType.Sms));
        }
Example #2
0
        public async Task <EmailMessage> GenerateUserRegisteredMsg(IPersonalData personalData)
        {
            var templateVm = new UserRegisteredTemplate
            {
                ContactPhone = personalData.ContactPhone,
                Country      = personalData.Country,
                DateTime     = personalData.Regitered,
                Email        = personalData.Email,
                FullName     = personalData.FullName,
                UserId       = personalData.Id
            };

            return(new EmailMessage
            {
                Body = await _localTemplateGenerator.GenerateAsync("UserRegisteredTemplate", templateVm, TemplateType.Email),
                Subject = EmailResources.UserRegistered_Subject,
                IsHtml = true
            });
        }