0 votes

Hi there,

I am able to get the access token and refresh token etc, but I cannot connect over SSL. I keep getting:

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 173.194.72.108:993

The code i have looks like this once i have the token:

using (Imap imap = new Imap())
{
    imap.ConnectSSL("imap.gmail.com");
    imap.LoginOAUTH2(user, accessToken);

It fails in the "ConnectSSL" method with the error. Its so frustrating. Ive done the hard yards with various tokens. What could be wrong?

by

1 Answer

0 votes

Your code is correct. The resolved IP (173.194.72.108) belongs to Google.

Which means that the problem is your firewall/router/AV software that is blocking the connection.

Does your application have enough permissions to create a remote connection?
Does your code work on your local machine/machine in different network?

by (301k points)
...