title: PHPMailer SMTP configuration
body: <p>For the past 2 hours I've been looking online to see if any other people encountered this problem, and it seems a lot has, bot none of the answers are working for me.</p>
  
  <pre><code>SMTP -&gt; FROM SERVER:220 mx.google.com ESMTP vq7sm928004oeb.13 
  SMTP -&gt; FROM SERVER: 250-mx.google.com at your service, [50.57.114.141] 250-SIZE 35882577 250-8BITMIME 250-STARTTLS 250 ENHANCEDSTATUSCODES 
  SMTP -&gt; FROM SERVER:220 2.0.0 Ready to start TLS 
  SMTP -&gt; FROM SERVER: 250-mx.google.com at your service, [50.57.114.141] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 250 ENHANCEDSTATUSCODES 
  SMTP -&gt; FROM SERVER:530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 vq7sm928004oeb.13 
  SMTP -&gt; ERROR: MAIL not accepted from server: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 vq7sm928004oeb.13 
  The following From address failed: my@email.com
  
  $mail-&gt;IsSMTP();
  $mail-&gt;SMTPDebug = 2;
  $mail-&gt;SMPTAuth = true;
  $mail-&gt;SMTPSecure = 'tls';
  $mail-&gt;Host = "smtp.gmail.com";
  $mail-&gt;Mailer = "smtp";
  $mail-&gt;Port = 587;
  $mail-&gt;Username = "my@email.com";
  $mail-&gt;Password = "password";
  </code></pre>
  
  <p>I've tried almost every setting for PHPMailer, but can't figure out what's still going wrong, are there any server settings I need to take care of?</p>
  
  <p>I also tried the normal php mail() function, but that's not sending mail either, although when using Drupal forms it just sends an email.</p>