title: Sending email in asp.net via local host server
body: <p>Is there any example that can explain me to send email from my localhost server ?
  I've written this example but it doesn't work the error is <strong>"Failure sending mail".</strong></p>
  
  <pre><code> SmtpClient smtpClient = new SmtpClient();
          smtpClient.Host = "localhost";
          smtpClient.Port = 25;
          smtpClient.EnableSsl = false;
          smtpClient.Credentials = new NetworkCredential("mostang1970@yahoo.com", "secret");
          smtpClient.Send("mostang1970@yahoo.com", "hadinematipartow@yahoo.com", "Let’s eat lunch!", "Lunch at the Steak House?");//here is the error
  </code></pre>
  
  <p>And what should i do in web.config?</p>