Larvel 5.4 +SMTP +Gmail + Aws EC2 ubuntu 16 not working Expected response code 250 but got code "", with message ""

60 views Asked by At

I have tried each Possible solution mentioned accross site but still i am unable to send smtp mail using Gmail on AWS EC2 ubuntu 16 but the same code is working on rackserver ubuntu 16.

Here the solutions i tried

following code in config/mail.php

driver : "smtp",
host : "smtp.gmail.com",
port : 587,
address: "[email protected]",
encryption : "tls"  or "ssl" //tried alternate
username : "[email protected]"
password : mypassword or gmail appkey // tried both alternate

i have enabled less secure password in gmail. Tried the following solution

sudo nano /etc/gai.conf

Uncomment the following line (remove the #):

precedence ::ffff:0:0/96 100

https://laracasts.com/discuss/channels/laravel/laravel-53-not-sending-emails-in-aws-ec2-ubuntu-1604?page=1

Below are my security groups in aws ec2 OutBound Rule Inbound Rule

Please help me someone what i am missing or what should i do.

0

There are 0 answers