title: Error in SPUtility send email
body: <p>I am trying to send an email in the button click event in the webpart.However, the email sending is failed and error is logged in both sharepoint logs and event viewer of the machine.
  The error is : Cannot connect to SMTP host</p>
  
  <p>Outgoing email settings in central admin is already configured. Alerts are also working fine.</p>
  
  <p>Below is my code:</p>
  
  <pre><code> StringDictionary headers = new StringDictionary();
   headers.Add("to", "someone@abc.com");
   headers.Add("from", "MySharePointEmail@myfatblog.co.uk");
   headers.Add("subject", "How to use SendEMail from SPUtility");
   headers.Add("content-type", "text/html"); 
   string bodyText = "This is the body of my email, in html format.";
   SPUtility.SendEmail(SPContext.Current.Web, headers, bodyText);
  </code></pre>
  
  <p>Thanks in advance</p>