title: SMTP server problems, PHP mail
body: <p>i have installed Apache and php5 on windows 8.1, but can't send mail from my localhost website, the message that appears "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\WebServer\Apache2.2\htdocs\WebContent\mailForm.php on line 22". The php code is below, i guess it's ok since it does the 'echos' correctly. Someone can give any tips about what's happening? Thanks.</p>
  
  <pre><code>    &lt;?php
  $first_name = $_POST['first_name'];
  $last_name = $_POST['last_name'];
  $email = $_POST['email'];
  $message = $_POST['message'];
  
  $to = "myemail@example.com";
  $subject = "New_message";
  
  
  if (($first_name == "") || ($last_name == "") || ($email == "") || ($message == ""))
  {
  echo '&lt;script type="text/javascript"&gt;alert("Fill in all fields")&lt;/script&gt;';
  }
  else
  {
      mail($to, $subject, $message, "From:" . $first_name . $last_name);
  echo "Sucess;
  }
  ?&gt;
  </code></pre>