title: Using Queue for mailing but laravel 5.4 does not seem to respond
body: <p>I am using queues for the first time and I don't seem to get it to work and laravel does not seem to throw any errors. </p>
  
  <p>I am trying to queue mail on user registration, that is user should be redirected to dashboard immediately and the email should be queued. How do I know if queue is not working? on clicking register I have to wait for 8 seconds before I see dashboard, I get the email on registration but queue seems to fail. </p>
  
  <p>I dont see any queue jobs on mysql jobs table at the time of registration.</p>
  
  <h1>Below are my settings:</h1>
  
  <h1>jobs and jobs-failed table created using below command:</h1>
  
  <pre><code>php artisan queue:table
  php artisan queue:failed-table
  php artisan migrate
  </code></pre>
  
  <h1>.env</h1>
  
  <pre><code>QUEUE_DRIVER=database
  
  MAIL_DRIVER=smtp
  
  MAIL_HOST=smtp.gmail.com
  MAIL_PORT=587
  MAIL_USERNAME=dummy@gmail.com
  MAIL_PASSWORD=password
  MAIL_ENCRYPTION=tls
  MAIL_FROM_ADDRESS=hello@example.com
  MAIL_FROM_NAME="App name"
  </code></pre>
  
  <h1>RegisterController create() function</h1>
  
  <p>at the end of create function just before <code>return $user;</code></p>
  
  <pre><code>dispatch(new NewRegisteredUser($user));
  </code></pre>
  
  <h1>jobs file: NewRegisteredUser</h1>
  
  <pre class="lang-laravel prettyprint-override"><code>namespace App\Jobs;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Queue\InteractsWithQueue;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use Illuminate\Foundation\Bus\Dispatchable;
  use Mail;
  use App\User;
  use App\Mail\RegisteredUserWelcome;
  
  class NewRegisteredUser implements ShouldQueue
  {
      use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  
      protected $user;
      /**
       * Create a new job instance.
       *
       * @return void
       */
      public function __construct(User $user)
      {
          $this-&gt;user = $user;
      }
  
      /**
       * Execute the job.
       *
       * @return void
       */
      public function handle()
      {
          $email = new RegisteredUserWelcome($this-&gt;user);
          Mail::to($this-&gt;user-&gt;email)-&gt;queue($email);
      }
  }
  </code></pre>
  
  <h1>Mail file: RegisteredUserWelcome</h1>
  
  <pre class="lang-laravel prettyprint-override"><code>namespace App\Mail;
  
  use App\User;
  use Illuminate\Bus\Queueable;
  use Illuminate\Mail\Mailable;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Contracts\Queue\ShouldQueue;
  
  class RegisteredUserWelcome extends Mailable
  {
      use Queueable, SerializesModels;
  
      protected $user;
      /**
       * Create a new message instance.
       *
       * @return void
       */
      public function __construct(User $user)
      {
          $this-&gt;user = $user;
      }
  
      /**
       * Build the message.
       *
       * @return $this
       */
      public function build()
      {
          return $this-&gt;markdown('emails.registered')
              -&gt;with([
                          'firstname' =&gt; $this-&gt;user-&gt;firstname,
                          'lastname' =&gt; $this-&gt;user-&gt;lastname,
                      ]);
      }
  }
  </code></pre>
  
  <p>Am I missing something here? I dont get error and mail is sent but no queue jobs observed in mysql and long wait time on registration.</p>
  
  <p>I am also confused how this: <a href="https://laravel.com/docs/5.4/mail#queueing-mail" rel="noreferrer">https://laravel.com/docs/5.4/mail#queueing-mail</a> fits with this <a href="https://laravel.com/docs/5.4/queues" rel="noreferrer">https://laravel.com/docs/5.4/queues</a> Why do we need queues separately when we already have queuing in mail? </p>
  
  <p>What should I use and how? All I need to do is reduce the wait-time of users and send mails behind the scene. Also, I am sending multiple emails in some cases. I guess this would help if I queue the jobs of multiple emails.</p>