title: How to send email from MVC 5 application
body: <p>I have a form that a customer is required to fill out. Once the form is submitted, I'd like to send the basic information from the form's Index view (First Name, Last Name, Phone Number, etc..) to an email.  I'm currently using GoDaddy for my hosting site.  Does this matter, or can I send the email directly from my MVC application?  I have the following for my Model, View, Controller. I've never done this before and am really not sure how to go about it.  </p>
  
  <p><strong><em>Model:</em></strong> </p>
  
  <pre><code>public class Application
  {
      public int Id { get; set; }
  
      [DisplayName("Marital Status")]
      public bool? MaritalStatus { get; set; }
  
  
      [Required]
      [DisplayName("First Name")]
      public string FirstName { get; set; }
  
      [DisplayName("Middle Initial")]
      public string MiddleInitial { get; set; }
       [Required]
      [DisplayName("Last Name")]
      public string LastName { get; set; }
  }
  </code></pre>
  
  <p><strong><em>Controller:</em></strong> </p>
  
  <pre><code>public ActionResult Index()
  {
          return View();
  }
  
  // POST: Applications/Create
  // To protect from overposting attacks, please enable the specific properties you want to bind to, for 
  // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
  [HttpPost]
  [ValidateAntiForgeryToken]
  public ActionResult Index([Bind(Include = "Id,FirstName,MiddleInitial,LastName")] Application application)
  {
      ViewBag.SubmitDate = DateTime.Now;
  
      if (ModelState.IsValid)
      {
          application.GetDate = DateTime.Now;
          db.Applications.Add(application);
          db.SaveChanges();
          return RedirectToAction("Thanks");
      }
  
      return View(application);
  }
  </code></pre>
  
  <p><strong><em>View</em></strong></p>
  
  <pre><code>&lt;table class="table table-striped"&gt;
      &lt;tr&gt;
          &lt;th&gt;
             @Html.ActionLink("First Name", "Index", new { sortOrder = ViewBag.NameSortParm })
          &lt;/th&gt;
  
          &lt;th&gt;
              @Html.ActionLink("Last Name", "Index", new { sortOrder = ViewBag.NameSortParm })
          &lt;/th&gt;
  
          &lt;th&gt;
              @Html.ActionLink("Date Submitted", "Index", new { sortOrder = ViewBag.NameSortParm})
          &lt;/th&gt;
      &lt;/tr&gt;
  
  @foreach (var item in Model) {
      &lt;tr&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.FirstName)
          &lt;/td&gt;
  
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.LastName)
          &lt;/td&gt;
  
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.GetDate)
          &lt;/td&gt;
      &lt;/tr&gt;
  }
  </code></pre>