Laravel - Connection could not be established with host smtp gmail com 0

0 votes

I have been working on sending an email from Gmail using Laravel from localhost. I'm getting this error:

Connection could not be established with host smtp.gmail.com [ #0]

I have been using ssl with port 465 and have additionally tried 587 but it didn't work. Additionally, I also tried many ways but it didn't work.

Feb 22 in Others by Rahul
• 8,980 points
132 views

1 answer to this question.

0 votes

While using the Laravel project directory, edit config/mail.php and add the following:

'stream' => [ 
              'ssl' => [ 
                        'allow_self_signed' => true, 
                        'verify_peer' => false, 
                        'verify_peer_name' => false, 
      ], 
]

Have shared my SMTP settings below:

MAIL_DRIVER=smtp 
MAIL_HOST=smtp.gmail.com 
MAIL_PORT=465 
MAIL_USERNAME=[Full Gmail Address] 
MAIL_PASSWORD=[Google App Password obtained after two step verification on Google Account Page] 
MAIL_ENCRYPTION=ssl

Hope this answers your question. 

answered Feb 22 by Aditya
• 7,280 points

Related Questions In Others

0 votes
0 answers

No connection could be made because the target machine actively refused it?

 I was doing HttpWebRequest to a WebService ...READ MORE

May 5 in Others by Kichu
• 16,050 points
57 views
0 votes
1 answer

In order to learn Node.js, I should be familiar with which other technologies ?

I appreciate your decision, its the perfect ...READ MORE

answered Jul 31, 2019 in Others by ArchanaNagur
• 2,340 points
298 views
0 votes
0 answers

Self Created Laravel Link Not Working

I installed laravel 6.0 through composer and ...READ MORE

Dec 3, 2019 in Others by anonymous
• 120 points
203 views
0 votes
3 answers

How to download attachment from gmail using UiPath?

Download IMAP Attachment Extractor and smoothly extract ...READ MORE

answered Jun 29, 2020 in RPA by zoey
• 140 points
5,639 views
0 votes
1 answer

Receiving Emails from Gmail in UiPath

Hi, Integration of Gmail with UiPath can be ...READ MORE

answered Mar 16, 2019 in RPA by Mugdha
• 600 points
2,476 views
0 votes
0 answers

Could not open input file: artisan

I got this error on CLI while ...READ MORE

Apr 30 in Other DevOps Questions by Kichu
• 16,050 points
28 views
0 votes
0 answers

Javamail Could not convert socket to TLS GMail

I want to send an email using ...READ MORE

May 2 in Java by Kichu
• 16,050 points
49 views
0 votes
1 answer

Windows git "warning: LF will be replaced by CRLF", is that warning tail backward?

 Depending on the editor you are using, ...READ MORE

answered Feb 16 in Others by Aditya
• 7,280 points
11 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP