private IEnumerable <MailMessageData> PrepareMessages(PostMailViewModel postMailViewModel) { var users = _userListData.GetData().ToList(); var messages = new List <MailMessageData>(); for (int i = 0; i < users.Count; i++) { messages.Add(new MailMessageData() { To = users[i].Email.ToString(), From = _smtpConfig.User, Subject = postMailViewModel.Post.Title, Body = postMailViewModel.Post.Content }); } return(messages); }