Beispiel #1
0
        public Email CreateVerificationEmail(User user, VerificationToken token)
        {
            var urlHelper = new UrlHelper();
            var validateActionUrl = urlHelper.Action("Verify", "Account", new { userId = user.Id, token = token.Value });
            var email = new Email()
            {
                To = user.Email,
                Subject = _applicationSettings.ApplicationName + ": " + Resources.Resources.EmailVerificationSubject,
                Body = ConfigureVerificationEmailBody(user.Name, validateActionUrl),

            };

            using (new UnitOfWork(EntitiesContext.Current))
            {
                var emailsRepository = _repositoryFactory.GetEmailsRepository();
                emailsRepository.Add(email);
            }

            return email;
        }
Beispiel #2
0
 public void QueryEmailSending(Email email)
 {
     throw new NotImplementedException();
 }