title: Lumen 5.3 send email
body: <p>I tried send a email from Lumen using gmail smtp config. I am using:</p>
  
  <ul>
  <li><code>illuminate/mail</code>, Version <code>5.3</code> </li>
  <li><code>lumen</code>, Version  <code>5.3</code></li>
  </ul>
  
  <p>I can't send an email.</p>
  
  <p>My router:</p>
  
  <pre><code>$app-&gt;get('/', function () use ($app) {
      $app-&gt;get('mail','mailcontroller@mail');
  });
  </code></pre>
  
  <p>My <code>AppServiceProvider.php</code>: </p>
  
  <pre><code>namespace App\Providers;
  use Illuminate\Support\ServiceProvider;
  
  class AppServiceProvider extends ServiceProvider {
  
      public function register() {
      $this-&gt;app-&gt;singleton('mailer', function ($app) {
          $app-&gt;configure('services');
          return $app-&gt;loadComponent('mail', 'Illuminate\Mail\MailServiceProvider', 'mailer');
          });
      }
  }
  </code></pre>
  
  <p>My <code>.env</code> configuration:</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.gmail.com
  MAIL_PORT=587
  MAIL_USERNAME=*******@gmail.com
  MAIL_PASSWORD=*********
  MAIL_ENCRYPTION=tls
  </code></pre>
  
  <p>My mail controller:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  use Illuminate\Support\Facades\Mail;
  
  class mailcontroller extends Controller {
      public function mail(){
          Mail::raw('Raw string email', function($msg) { 
              $msg-&gt;to(['****.com']); 
              $msg-&gt;from(['*****@gmail.com']); });
      }
  }
  </code></pre>
  
  <p>Also i have enable following lines in <code>app.php</code>:</p>
  
  <pre><code>$app-&gt;register(App\Providers\AppServiceProvider::class);
  $app-&gt;withFacades();
  </code></pre>