title: Send mail using localhost SMTP
body: <p>I am trying to setup SMTP server on IIS for sending mails. The SMTP server is intended to be used by the ASP.NET code in C#. </p>
  
  <p>I was previously using gmail smtp wherein i provided the smtp.gmail.com as host with secure port and my gmail uid/pwd. That worked fine. Here is the code used to do that.</p>
  
  <pre><code>SmtpClient smtpClient = new SmtpClient();
  smtpClient.UseDefaultCredentials = false;
  smtpClient.Host = "smtp.gmail.com";
  smtpClient.Port = 587;
  smtpClient.Credentials = new NetworkCredential(uname,pwd);
  smtpClient.EnableSsl = true;
  smtpClient.Send(mailMessage);
  </code></pre>
  
  <p>Now i am planning to use the localhost SMTP server on IIS, <strong>what values should i be giving for the parameters UseDefaultCredentials and Credentials.</strong> I will be assigning false to EnableSsl as it's over port 25.</p>
  
  <p>Also, what could be the most simple SMTP virtual server configuration.</p>