public ActionResult SendFromResidentToBuilding([Bind(Include = "Id,Resident,BuildingName,Unit,Subject,Body")] Messages messages)
        {
            if (ModelState.IsValid)
            {
                db.Messages.Add(messages);
                db.SaveChanges();

                string residentEmail = null;

                var residentEmailQuery = from rm in db.Residents
                                         where (rm.Location == messages.BuildingName)
                                         select rm.EmailAddress;

                foreach (string result in residentEmailQuery)
                {
                    residentEmail = result;
                    MailGun managerMessageToResident = new MailGun();
                    managerMessageToResident.SendFromResidentToBuilding(residentEmail, messages.Subject, messages.Body, messages.BuildingName, messages.Resident, messages.Unit);
                }

                return(RedirectToAction("MessageSuccess"));
            }

            return(View(messages));
        }