title: send email from MVC 4 ASP.NET app
body: <p>I am trying to setup simple but complete ASP.NET MVC 4 web app, where I can send email to specific address, I configure the web.config file for SMPT settings and code in controller call, but I am getting error message "The SMTP host was not specified"</p>
  
  <pre><code>&lt;system.net&gt;
  &lt;mailSettings&gt;
    &lt;smtp deliveryMethod="Network" from="myEmail@hotmail.co.uk"&gt;
      &lt;network host="smtp.live.com" port="25" userName="myEmail@hotmail.co.uk" password="myPassword" defaultCredentials="true"/&gt;
    &lt;/smtp&gt;
  &lt;/mailSettings&gt;
  </code></pre>
  
  <p></p>
  
  <h2>in controller class</h2>
  
  <pre><code>var mailMessage = new MailMessage();
  mailMessage.To.Add("yourEmail@hotmail.co.uk");
  mailMessage.Subject = "testing 2 ";
  mailMessage.Body = "Hello Mr. Aderson";
  mailMessage.IsBodyHtml = false;
  
  var smptClient = new SmtpClient { EnableSsl = false };
  
  smptClient.Send(mailMessage);
  </code></pre>
  
  <p>many thanks</p>