Sending gmail

How to resolve this while sending gmail


SMTP Server:
Port: If SSL is enabled use Port 465. If TLS is enabled use Port 587.
Auth Username: This will be your full Gmail address. (e.g.

1 Like

If i give port number 465 or 587.
i am getting Authentication failed.

This is usually related to 2-step authentication. Something you can test out easy: generate a google app password and use that instead of your normal account password.

1 Like

In setting after checking

Enable POP for mail that arrives from now on.
Enable IMAP

This both check boxes only Enable IMAP check box is checking after saving

Np. Hope you followed the steps given on the post.
Did you run the code.
Are you facing any error there.

i am getting this error

Np. It’s anyways optional .
Try to run the code.

same i am getting Authentication failed.

Please enable less secure apps for your account here.


Thank you it works

1 Like

Below is the tutorial