title: php mail localhost
body: <p>I keep getting this error:</p>
  
  <pre><code> Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set
  </code></pre>
  
  <p>I'm using a windows machine and php mail settings are:</p>
  
  <pre><code>[mail function]
  ; For Win32 only.
  ; http://php.net/smtp
  SMTP = localhost
  ; http://php.net/smtp-port
  smtp_port = 25
  
  ;For Win32 only.
   ;http://php.net/sendmail-from
  
  sendmail_from = sales@megadirectory.co.uk
  </code></pre>
  
  <p>Could someone tell me what settings to put in my php.ini file or give me some ini_set settings</p>
  
  <p>Thanks 
  Sam</p>