title: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 465,
body: <p>I have config the wamp server and have made changes to relevant files as well but i am getting above error again and again so please help me to get over it ..... because it is too hectic......</p>
  
  <p>This is my mail() function code</p>
  
  <pre><code> &lt;?php
     if(mail('vipinkumarsn4@gmail.com','Hello', 'hello', 'noreply@gmail.com'))
          echo "Email sent";
      else
          echo "Email sending failed";
      ?&gt;
  </code></pre>
  
  <p>This is my sendmail.ini file</p>
  
  <pre><code>         [sendmail]
       smtp_server=smtp.gmail.com
  
          ; smtp port (normally 25)
  
          smtp_port=465
  
          ; SMTPS (SSL) support
          ;   auto = use SSL for port 465, otherwise try to use TLS
          ;   ssl  = alway use SSL
          ;   tls  = always use TLS
          ;   none = never try to use SSL
  
          smtp_ssl=ssl
  </code></pre>
  
  <p>php.ini file</p>
  
  <pre><code>[mail function]
      ; For Win32 only.
      SMTP = localhost
      smtp_port = 465
  
      ; For Win32 only.
      sendmail_from = vipin.cybomate@gmail.com
  </code></pre>