title: How do I send emails through PHP to GMail?
body: <p>I'm guessing that this:</p>
  
  <pre><code>&lt;?php
  
      $emailTo = 'user1@gmail.com';
      $subject = 'I hope this works!';
      $body = 'Blah';
      $headers='From: user@gmail.com'
  
      mail($emailTo, $subject, $body, $headers);
  
  ?&gt;
  </code></pre>
  
  <p>is not going to cut it. I searched for ways that I can send to email with SMTP auth and mail clients and programs such as PHPMailer, but I don't have a concise and direct answer yet thats helpful. Basically, I want a way to send emails to gmail, hotmail, etc (which will be my email) from another email (sender) through a form on my website</p>
  
  <p>Questions:   </p>
  
  <ol>
  <li>Do I need to download a 3rd party library to this?</li>
  <li>If not, how can I change the code above to make it work.</li>
  </ol>
  
  <p>Thanks!</p>