Example #1
0
 public void CreateNewUser(string name, string email, string password)
 {
     // Create the user's account
     _repository.Add(new User {
         Name = name, Email = email, Password = password
     });
     _repository.SaveChanges();
     // Now send a welcome email to the user
     _userMailer.Welcome(new WelcomeMailModel {
         Name = name, To = email
     }).Send();
 }
        public ActionResult SignUp(SignUpViewModel signUp)
        {
            if (ModelState.IsValid)
            {
                var createClient = new CreateClientCommand(signUp.Name, signUp.Email, signUp.Password, signUp.Brag,
                                                           signUp.Latitude, signUp.Longitude, signUp.Source.Value);

                ExecuteCommand(createClient);

                _userMailer.Welcome(signUp.Name, createClient.EmailVerificationCode, signUp.Email).Send();

                return(RedirectToAction("SignUpSuccess"));
            }

            return(View());
        }
Example #3
0
 public ActionResult Index()
 {
     _mailer.Welcome().SendAsync();
     return(View());
 }