Gmail Configuration error using IMAP - Timed Out and Socket Exception

Getting following error while configuring IMAP to gmail account
Port :- 993
Server:- “imap.gmail.com
User :- “usernam”
Password: “mypassword”

I have enabled IMAP forwading on my gmail account. Let me know if any more setting is required.

ERROR:-

{
“message”: “Get IMAP Mail Messages : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.126.108:993”,
“timeStamp”: “13:43:26”,
“level”: “Error”,
“fileName”: “email”
}

@Dhananjay2020

You need to enable the two-verification step, then only it will work, password is not your gmail id password, it will be different which is generated at the time of two-verification step.

Thanks

Thanks for your reply, but 2 step verification is extra security layer for signing into gmail account. It has nothing to do with the connection with imap.gmail.com

@Dhananjay2020 Check the below link.

Hello,
In this video I use Gmail with IMAP:

Thanks,
Cristian Negulescu