Error sending email 2: connection failed

I have used gmail smtp server but while sending email its giving Connection failed error.

Hi Afaque,

If I remember correctly, the SMTP port needs to be 587. Furthermore, you should republish your application after changing email configuration for it to be applied correctly.

Refer to this post for more information.

And here are some other useful links regarding this topic.



If it still doesn't work, check if your account is with one step authentication only and "Allow Less secure apps" on.


Thanks @Nurodin and Nuno, to make it work I have changed port to 587 and in my account made  "Allow Less secure apps" On. 



Glad we could help Afaque.