public ActionResult Index(MailViewModel cvm)
 {
     ContactHistory ch = new ContactHistory();
     Common.CopyProperties(cvm, ch, false);
     ch.ContactDate = DateTime.Now;
     ch.BusinessName = cvm.BusinessName;
     ch.Comments = cvm.Comments;
     ch.ContactName = "";
     ch.Phone = cvm.Phone;
     ch.Email = cvm.Email;
     db.ContactHistories.Add(ch);
     string Message = "";
     Message += "Date:" + ch.ContactDate + "\n\r";
     //Message += "Business Name: " + ch.BusinessName + "\n\r";
     Message += "Contact Name: " + ch.ContactName + "\n\r";
     Message += "Company Name: " + ch.BusinessName + "\n\r";
     Message += "Phone: " + ch.Phone + "\n\r";
     Message += "Email Addr: " + ch.Email + "\n\r";
     Message += "Message: " + ch.Comments + "\n\r";
     Class_Gmail mail = new Class_Gmail(ch.Email, ch.BusinessName, "*****@*****.**", "Customer Service", "*****@*****.**", "Feline33");
     mail.Subject = "Inquiry";
     mail.Body = Message;
     mail.Send();
     db.SaveChanges();
     MailViewModel mvm = new MailViewModel();
     mvm.Msg = "Message Sent";
     return View(mvm);
 }
 public ActionResult Index()
 {
     MailViewModel mvm = new MailViewModel();
     return View(mvm);
 }
 // GET: Contact
 public ActionResult MailView()
 {
     MailViewModel cvm = new MailViewModel();
     return View(cvm);
 }