title: Failed to send an email in laravel 5
body: <p>My code is like this : </p>
  
  <pre><code>public function sendMail(array $data)
      { 
          $data = explode('#', $data['id']);
          $email_from = Auth::user()-&gt;email;
          $email_to = $data[4];
          $subject = 'Send Email Test';
  
          $data_user = ['user_name' =&gt; $data[1], 'full_name' =&gt; $data[2].' '.$data[3] ];
  
          $sent = Mail::send('backend.auth.success_approved', $data_user, function ($mail) use ($email_to, $email_from, $subject)
                  {
                      $mail-&gt;from($email_from)
                           -&gt;to($email_to)
                           -&gt;subject($subject);
                  });
      }  
  </code></pre>
  
  <p>My configuration in mail.php :</p>
  
  <pre><code>return [
      'driver' =&gt; env('MAIL_DRIVER', 'smtp'),
      'host' =&gt; env('MAIL_HOST', 'ssl://secure.emailsrvr.com'),
      'port' =&gt; env('MAIL_PORT', 465),
      'from' =&gt; ['address' =&gt; 'myemail@chel.com', 'name' =&gt; 'myname'],
      'encryption' =&gt; env('MAIL_ENCRYPTION', 'tls'),
      'username' =&gt; env('MAIL_USERNAME', 'myemail@chel.com'),
      'password' =&gt; env('MAIL_PASSWORD', 'mypassword'),
      'sendmail' =&gt; '/usr/sbin/sendmail -bs',
      'pretend' =&gt; false,
  ];
  </code></pre>
  
  <p>There is error message :</p>
  
  <p><code>Swift_TransportException in StreamBuffer.php line 265: Connection could not be established with host ssl://secure.emailsrvr.com [php_network_getaddresses: getaddrinfo failed: The requested name is valid, but no data of the requested type was found. #0].</code> </p>
  
  <p>How to solve this problem? </p>
  
  <p>Thank you. </p>