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: "toadysapps@gmail.com",
encryption : "tls" or "ssl" //tried alternate
username : "toadysapps@gmail.com"
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
Below are my security groups in aws ec2
Please help me someone what i am missing or what should i do.