public void NotifyAllUsers(List <string> mails, string title, string content) { foreach (var mail in mails) { EmailSend.SendEmailTo(mail, title, content); } }
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); }
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); }