Cannot access gmail using GET IMAP

Hi

I have configured to access my Gmail inbox account using GET IMAP mail messages (see below screenshot) and got the following error

"
Get IMAP Mail Messages: An error occurred while attempting to establish an SSL or TLS connection.

The server’s SSL certificate could not be validated for the following reasons:
• The server certificate has the following errors:
• The revocation function was unable to check revocation for the certificate.

Exception type: MailKit.Security.SslHandshakeException
"

I have already enabled IMAP as well as turn on less secure app access for my google email account

I am using Studio 2021.2.0-beta.44

Could you please help to resolve the problem

Thanks in advance
Opp

1 Like

Hey @opp,

Welcome to community.

What’s the password you are using in here,

  • is it the normal pwd you use to login
  • or the generated app password from gmail security settings

Thanks
#nK

Hi #nK

I am using the pwd that I use to login to Gmail through a web browser.

Are you suggesting to use a generated app password? I understand that is for account using 2-Step Verification. I am not using that to login to Gmail through a web browser and I do not intend to enable it.

Is that the only way to get ‘GET IMAP’ working? I also have the same error for ‘GET POP3’. Also need a generated app password?

Thank you
Opp

@opp - In my case, I have to disable the anti-virus for say for 10 mins(for testing) in order to resolve the above error. Please try this…

Hi prasath17

I do not intend to disable my anti-virus (if it works) just so that I can get ‘Get IMAP’ working.

I will be very disappointed with UiPath if UiPath.Mail.Activities package is developed in such a manner.

Thank you
Opp

1 Like

Yep, you need to use app based password.

As per google’s security standards, any app interacting with google will be authorized via app password.

This is what I think.

Thanks
Nithin

1 Like

Hi Nithin

I also have the same error message when using ‘Send SMTP Mail Message’ for both Gmail and YahooMail. In the case of YahooMail, I am using app based password. So I do not think the error, in the case of Gmail, is caused by not using app based password.

Have you tried running the code in my earlier screenshot and did you receive the same error message when using normal password and successful when using app based password?

Thank you
Opp

Hi !
I had this problem with another host server, and ended up downgrading secureconnection to None and it worked. Maybe it could help

1 Like

Hi Hiba_B

Downgrading secureconnection to None does not work for me. I believe the port also need to change for secureconnection None? What port number did you use?

What is the difference between your two host servers that one works and the other doesn’t? Need to know so that our uipath project can be deployed universally.

Thank you
Opp

I used port 143 with secureconnection to None.
The difference is the environment: the computer itself could not check the revocation certificate status used by the company’s strategy. The certificate was created by the company itself.
To check if it’s a problem with the relation computer-certificate itself, you can do it through powershell like this
For me it returned false, so I understood that there was an internal problem

Hi Hiba_B

Thank you for the link https://answers.microsoft.com/en-us/windowslive/forum/livemail-email-send/keep-getting-this-error-code/3a40a845-bed8-4543-b772-207c7c5aa4cf

I now understand why I have to disable my Anti-virus Email Shield for it to work.

Hi prasath17

You may want to include the above link in future to justify your solution.

To everyone that has contributed, a very big THANK YOU for helping me solve the problem!

Best regards
Opp

2 Likes

Glad it finally worked for you…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.