title: Laravel 5.5 Expected response code 250 but got code "530"
body: <p>I know it is a duplicate issue in StackOverFlow (<a href="https://stackoverflow.com/questions/37469770/laravel-swiftmailer-expected-response-code-250-but-got-code-530-with-messag">Laravel SwiftMailer : Expected response code 250 but got code &quot;530&quot;, with message &quot;530-5.5.1 Authentication Required</a>) however, I'm done all the remedies discussed there but still no luck. I'm using mailtrap.io using my GMail account. Here is the .env file and mail.php (under config):</p>
  
  <h2>.env</h2>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.mailtrap.io
  MAIL_PORT=2525
  MAIL_USERNAME=XXXX
  MAIL_PASSWORD=XXXX
  MAIL_ENCRYPTION=tls
  </code></pre>
  
  <h2>mail.php</h2>
  
  <pre><code>'driver' =&gt; env('MAIL_DRIVER', 'smtp'),
  'host' =&gt; env('MAIL_HOST', 'smtp.mailtrap.io'),
  'port' =&gt; env('MAIL_PORT', 2525),
  'from' =&gt; [
          'address' =&gt; env('MAIL_FROM_ADDRESS', 'niladriXXX@XXX.com'),
          'name' =&gt; env('MAIL_FROM_NAME', 'Niladri Banerjee'),
      ],
  'encryption' =&gt; env('MAIL_ENCRYPTION', 'tls'),
  'sendmail' =&gt; '/usr/sbin/sendmail -t -i',
  'markdown' =&gt; [
          'theme' =&gt; 'default',
  
          'paths' =&gt; [
              resource_path('views/vendor/mail'),
          ],
      ],
  </code></pre>
  
  <p>After submitting the valid email from forgot password screen, it throws the following error:</p>
  
  <blockquote>
    <p>Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required "</p>
  </blockquote>
  
  <p>Please note: I have already ON 'Allow less secure apps' from "Sign-in &amp; security" from my GMail.</p>
  
  <p>Seeking your help.</p>
  
  <p>PS: I'm running the project in localhost.</p>