title: Laravel SwiftMailer : Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required
body: <p>I am using laravel 5.2, And the using Swift Mailer for password resetting.
  <strong>I have 2-step verification on my gmail.</strong>.</p>
  
  <p>As the google help says :</p>
  
  <hr>
  
  <p>If you've turned on 2-Step Verification for your account, you might need to enter an App password instead of your regular password.</p>
  
  <hr>
  
  <p>I have the following settings on <code>mail.php</code> :</p>
  
  <pre><code>return [
      'driver' =&gt; env('MAIL_DRIVER', 'smtp'),
      'host' =&gt; env('MAIL_HOST', 'smtp.gmail.com'),
      'port' =&gt; env('MAIL_PORT', 465),
      'from' =&gt; ['address' =&gt; 'meaprogrammer@gmail.com', 'name' =&gt; 'Shafee'],
      'encryption' =&gt; env('MAIL_ENCRYPTION', 'ssl'),
      'username' =&gt; env('meaprogrammer@gmail.com'),
      'password' =&gt; env('MY_Gmail_API_KEY'),
      'sendmail' =&gt; '/usr/sbin/sendmail -bs',
      'pretend' =&gt; env('MAIL_PRETEND', false),
  
  ];
  </code></pre>
  
  <p>On the <code>.env</code> i have :</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.gmail.com
  MAIL_PORT=465
  MAIL_USERNAME=meaprogrammer@gmail.com
  MAIL_PASSWORD=MY_Gmail_API_KEY
  MAIL_ENCRYPTION=ssl
  </code></pre>
  
  <p>The following error comes up :</p>
  
  <pre><code>Swift_TransportException in AbstractSmtpTransport.php line 383:
  
  Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required. 
  
  Learn more at
  530 5.5.1 https://support.google.com/mail/answer/14257 w10sm15831823wjk.18 - gsmtp
  "
  </code></pre>