コード例 #1
0
 public void NotifyAllUsers(List <string> mails, string title, string content)
 {
     foreach (var mail in mails)
     {
         EmailSend.SendEmailTo(mail, title, content);
     }
 }
コード例 #2
0
 public void AddUpdateUser(UserViewModel user)
 {
     user.PasswordHash = PasswordEncoder.EncodePasswordMd5(user.PasswordHash);
     _userRepository.AddOrUpdateUser(_mapper.Map <IdentityUser>(user));
     _userRepository.Save();
     EmailSend.SendEmailTo(user.Email, "Registered at Shopping Site", "You have registered succesfully " + user.UserName);
 }
コード例 #3
0
        public void ProcessShoppingList(ShoppingListViewModel shoppingList)
        {
            var body = "Shopping list details \n";

            body = "Description " + body + shoppingList.Description + "Name " + shoppingList.Name;
            body = body + "\n" + "Items in your shopping list" + "\n";
            foreach (var itemListViewModel in shoppingList.ItemList)
            {
                body = body + itemListViewModel.Content + itemListViewModel.Quantity + itemListViewModel.QuantityType.Name + "\n";
            }

            body = body + "THNX FOR PURCHASING!";

            EmailSend.SendEmailTo("*****@*****.**", "Your shopping list", body);
        }