title: Laravel 5 SwiftMailer's Send: how to get error code
body: <p>I am sending email similar to this: <a href="https://stackoverflow.com/questions/31378357/laravel-5-sending-email">Laravel 5: Sending Email</a>. This is how I do it:</p>
  <pre><code>$mail_status = Mail::send( 'emails.followup', $data, function( $message ) use ($data) {
               $message-&gt;to( $data['email'] )
              -&gt;from( $data['email_from'], $data['email_name'] )
              -&gt;subject( $data['subject'] );
          });
  
  if($mail_status) {
      $ret_status = 'sent';
  }
  else
      $ret_status = 'sent_failed';
  </code></pre>
  <p>Now, if the <code>$ret_status</code> is 'sent_failed', I want to know what happened. How do I do it? How can I see the message from the mail server?</p>
  <p>Here is my <code>.env</code> file:</p>
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=mail.mydomain.com
  MAIL_PORT=465
  MAIL_USERNAME=noreply@mydomain.com
  MAIL_PASSWORD=thepassword
  MAIL_ENCRYPTION=ssl
  </code></pre>
  <h2>Update</h2>
  <p>Looks like the approach above is Laravel 4. If you know how to get the error code using Laravel 5+, I can consider it as the correct answer.</p>