Unable to send email through "get IMAP mail message"

I have configured my gmail account as per Enabling Gmail for Email Activities.
I didn’t enable 2-way authentication but enabled less secure apps.

When I try to connect to this gmail account through UIPath, I am getting the below error message.

OpenMailBox has thrown an exception

Source: Get IMAP mail messages

Message: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server

Exception Type: SocketException

System.Net.Sockets.SocketException (0x80004005): This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server
at UiPath.Mail.Activities.GetMailActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Kindly advise. Thanks

@PinknPurple which port number you are giving

I tried port number 143, 993 and 995. All same response.

@PinknPurple https://myaccount.google.com/lesssecureapps

Enable less secure app

Already done that, still same.


how do I get rid of this error?
please someone help me!!!

Did you get any solution. I am facing the same issue