title: why can't i send email using php?
body: <p>I have done the setting in <code>sendmail.ini</code> and <code>php.ini</code> so that I can send email by using gmail. The recipient is my hotmail. When I open my hotmail, nothing is received from my gmail. Can anyone help me with that? below is my php code:</p>
  
  <pre><code>&lt;?php
      $to = 'kill_stealer90@hotmail.com';
      $subject = 'hello';
      $message = 'why i so pro';
      $headers = 'From:jackychickenchan@gmail.com';
      if (mail($to,$subject,$message,$headers)){
          echo("&lt;p&gt;sent&lt;/p&gt;");
      }else{
          echo("&lt;p&gt;failed&lt;/p&gt;");
      }
  ?&gt;
  </code></pre>
  
  <p>and here is my sendmail.ini setting</p>
  
  <pre><code>smtp_server=smtp.gmail.com
  
  ; smtp port (normally 25)
  
  smtp_port=465
  
  smtp_ssl=auto
  
  auth_username=jackylonelyboy+gmail.com
  auth_password=nemesis90
  </code></pre>
  
  <p>and here is my php.ini setting</p>
  
  <pre><code>; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
  ; SMTP = smtp.gmail.com
  ; smtp_port = 465
  </code></pre>