title: PHP mail function not working
body: <p>I have written a basic script for the mail functionality.
  I am trying to run this script through WAMP server.</p>
  
  <pre><code>&lt;?php
  phpinfo();
  
  $to = "mss@xyz.com";
  $subject = "Test mail";
  $message = "Hello! This is a simple email message.";
  $from = "mohan.s@xyz.com";
  $headers = "From: $from";
  $res= mail($to,$subject,$message,$headers);
  echo " $res Mail Sent.";
  ?&gt; 
  </code></pre>
  
  <p>I have set the SMTP, sendmail_from in the php.ini file . 
  It gives me the following error </p>
  
  <blockquote>
    <p>Warning: mail() [function.mail]: Failed to connect to mailserver at
    "mucse409.eu.xyz.com" port 25, verify your "SMTP" and "smtp_port"
    setting in php.ini or use ini_set() in C:\wamp\www\email.php on line 9
    Mail Sent.</p>
  </blockquote>
  
  <p>I am able to ping the SMTP address from my machine. Please guide me. </p>