Gmail Configuration error using IMAP - Timed Out and Socket Exception

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

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


“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”,
“timeStamp”: “13:43:26”,
“level”: “Error”,
“fileName”: “email”


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 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

@Dhananjay2020 Check the below link.

In this video I use Gmail with IMAP:

Cristian Negulescu