Error while Sending Mails using Gmail SMTP in laravel project


I want to send mail using Gmail from my laravel project.

I am using all required details of gmail account into project env file but i am getting this error.

Error : Swift_TransportException in StreamBuffer.php line 268:  Connection could not be established with host [Connection refused #111]  

When i am sending mails from my local i mean using driver "sendmail" mails are working fine but my requirment is i want to send mails from smtp.

Below is code you can see what i am using.


return [   /*   |--------------------------------------------------------------------------   | Mail Driver   |--------------------------------------------------------------------------   |   | Laravel supports both SMTP and PHP's "mail" function as drivers for the   | sending of e-mail. You may specify which one you're using throughout   | your application here. By default Laravel is setup for SMTP mail.   |   | Supported: "smtp" "mail