Community Discussions and Support
PM 4.91 GMAIL Account OAUTH2 failed

Hallo Pmail Community Support,
I would like to manage a Gmail account using PegasusMail.
Unfortunately, it doesn't work:
Error message: “Error validating Gmail account”
I can access my account in the browser; OAuth2 is enabled in Gmail.


69d3e3e45f400


What could be causing Pegasus to generate this error?
Can anyone help me?
Best regards,
Ekkehard Goebel, Nürnberg, Germany
P.S.:
There is no problem with Thunderbird.


Hallo Pmail Community Support, I would like to manage a Gmail account using PegasusMail. Unfortunately, it doesn't work: Error message: “Error validating Gmail account” I can access my account in the browser; OAuth2 is enabled in Gmail. ![69d3e3e45f400](serve/attachment&path=69d3e3e45f400) What could be causing Pegasus to generate this error? Can anyone help me? Best regards, Ekkehard Goebel, Nürnberg, Germany P.S.: There is no problem with Thunderbird.

Ekkehard Goebel, Nürnberg - Germany

What could be causing Pegasus to generate this error?


I do not recall ever seeing this error. Did it occur after clicking the "Finished" button upon return to Pegasus Mail from logging in to Google?


If you click the Pegasus Mail "GMail" button now, does it show that a GMail profile already exists? If so, use the "Revalidate" which will re-authenticate to Google. If not, try the process again.


It should open a "Sign in with Google" page in your browser on which is shown your gmail account as one you can choose. Selecting it then prompts for your password, which if correct, will be accepted and will then display instructions to return to Pegasus Mail where you then click the "Finished" button.
Note: This process leaves you logged in to Google so you may want to return to Google and sign out if you do not normally stay logged in.


FWIW, I tested a revalidate using in incorrect password and was prompted by Google for a correct one. I could not replicate the "Effor validating GMail account" message.


[quote="pid:58838, uid:56141"]What could be causing Pegasus to generate this error?[/quote] I do not recall ever seeing this error. Did it occur after clicking the "Finished" button upon return to Pegasus Mail from logging in to Google? If you click the Pegasus Mail "GMail" button now, does it show that a GMail profile already exists? If so, use the "Revalidate" which will re-authenticate to Google. If not, try the process again. It should open a "Sign in with Google" page in your browser on which is shown your gmail account as one you can choose. Selecting it then prompts for your password, which if correct, will be accepted and will then display instructions to return to Pegasus Mail where you then click the "Finished" button. Note: This process leaves you logged in to Google so you may want to return to Google and sign out if you do not normally stay logged in. FWIW, I tested a revalidate using in incorrect password and was prompted by Google for a correct one. I could not replicate the "Effor validating GMail account" message.

Dear Brain Fluet,
Thank you for your detailed response.
In the meantime, I have made further unsuccessful attempts.
I would like to describe my approach here and address your questions and tips:


Although the German help section does not specify that the Google/Gmail account should be
open in the browser, I did so. Two-factor authentication is enabled for Google/Gmail.


In the “Internet Settings” dialog, I enter the email address in question, but there is actually only a ‘GMAIL’ button to click here. (I have enabled the “Record Internet session” checkbox).


  • It does not indicate that a Gmail profile already exists
  • No “Sign in with Google” browser window opens—I already did that earlier.
  • The same thing happens when I am not signed in to Google/Gmail.

The “Automatic Configuration for Gmail” dialog box appears. Here, you need to enter the email address and select the three checkboxes.However, the result is exactly the same regardless of which checkboxes I select.The settings I believe are correct:

  • Gmail Validation ON
  • IMAP OFF (because I generally don’t use IMAP)
  • POP and SMTP ON Any other combination results in the same error immediately after I click “OK.”The ‘OAUTH2’ and ‘TCPLogs’ folders are created but remain empty.

My ‘Windows 11 Pro 25H2’ on a desktop PC is well-maintained and error-free.
C:\PMAIL D:\PMAILDAT\MAIl\ADMIN
The same goes for my laptop, on which I also tried this without success—even after a complete reinstallation.
To me, it looks as though Pmail isn’t even attempting to connect to Google/Gmail.
Or am I missing something?


Best regards
Ekkehard Goebel, Nürnberg, Germany


Dear Brain Fluet, Thank you for your detailed response. In the meantime, I have made further unsuccessful attempts. I would like to describe my approach here and address your questions and tips: Although the German help section does not specify that the Google/Gmail account should be open in the browser, I did so. Two-factor authentication is enabled for Google/Gmail. In the “Internet Settings” dialog, I enter the email address in question, but there is actually only a ‘GMAIL’ button to click here. (I have enabled the “Record Internet session” checkbox). - It does not indicate that a Gmail profile already exists - No “Sign in with Google” browser window opens—I already did that earlier. - The same thing happens when I am not signed in to Google/Gmail. The “Automatic Configuration for Gmail” dialog box appears. Here, you need to enter the email address and select the three checkboxes. However, the result is exactly the same regardless of which checkboxes I select. The settings I believe are correct: - Gmail Validation ON - IMAP OFF (because I generally don’t use IMAP) - POP and SMTP ON Any other combination results in the same error immediately after I click “OK.” The ‘OAUTH2’ and ‘TCPLogs’ folders are created but remain empty. My ‘Windows 11 Pro 25H2’ on a desktop PC is well-maintained and error-free. C:\PMAIL D:\PMAILDAT\MAIl\ADMIN The same goes for my laptop, on which I also tried this without success—even after a complete reinstallation. To me, it looks as though Pmail isn’t even attempting to connect to Google/Gmail. Or am I missing something? Best regards Ekkehard Goebel, Nürnberg, Germany

Ekkehard Goebel, Nürnberg - Germany

After clicking OK in the “Automatic Configuration for Gmail” dialog box, a browser window should open to a Google authentication page. This action is likely dependent on being able to invoke a browser. Does you Win11 have a default browser configured? If so, if you double click a link in an email will it open in a browser? If not, then I would get this working and then try the Gmail OAUTH2 configuration again. The browser configuration options are in Tools > Options > Incoming mail > Hyperlinks.


Regarding

No “Sign in with Google” browser window opens—I already did that earlier.


If you are talking about being already signed in to Google in a browser, that does not have anything to do with the Pegasus Mail OAUTH2 process. Pegasus Mail triggers a link the goes to a specific Google page where you must authenticate with your Gmail credentials. Successful authentication then passes some sort of token back to Pegasus Mail which then creates an OAUTH2 profile and the requested host definitions.


All of this said, I do not use the German version. AFAIK, it is only a German translation, the functionality is the same. This forum has an active German member who I hope will see this discussion soon and contribute his thoughts.


After clicking OK in the “Automatic Configuration for Gmail” dialog box, a browser window should open to a Google authentication page. This action is likely dependent on being able to invoke a browser. Does you Win11 have a default browser configured? If so, if you double click a link in an email will it open in a browser? If not, then I would get this working and then try the Gmail OAUTH2 configuration again. The browser configuration options are in Tools > Options > Incoming mail > Hyperlinks. Regarding [quote="pid:58852, uid:56141"]No “Sign in with Google” browser window opens—I already did that earlier.[/quote] If you are talking about being already signed in to Google in a browser, that does not have anything to do with the Pegasus Mail OAUTH2 process. Pegasus Mail triggers a link the goes to a specific Google page where you must authenticate with your Gmail credentials. Successful authentication then passes some sort of token back to Pegasus Mail which then creates an OAUTH2 profile and the requested host definitions. All of this said, I do not use the German version. AFAIK, it is only a German translation, the functionality is the same. This forum has an active German member who I hope will see this discussion soon and contribute his thoughts.

Dear Mr. Brian Fluet,


I’ve been experimenting further without success until it occurred to me that, since you don’t have any issues with the English version of GMail, you might not be able to understand what’s happening on my end.
So I installed the original English version of PM and it worked perfectly.
This means that an error has crept into the GERMAN translation in the area of OAUTH_Gmail initialization. Specifically, as soon as I click OK in the “Automatic GMail configuration” dialog: “Error on Gmail OAUTH2”.


The “Setting up OAUTH2 authentication . . .” dialog is not displayed!


In the English version, a similar error message appears when the “Setting up . . .” dialog is canceled using “Cancel process”: “Error validating Gmail account.”


Mr. Fluet, perhaps you could assist your German Pegasus colleagues in fixing this error?


In any case, I would like to thank you very much for your patience, which ultimately led to success.


Best regards,
Ekkehard Goebel


Dear Mr. Brian Fluet, I’ve been experimenting further without success until it occurred to me that, since you don’t have any issues with the English version of GMail, you might not be able to understand what’s happening on my end. So I installed the original English version of PM and it worked perfectly. This means that an error has crept into the GERMAN translation in the area of OAUTH_Gmail initialization. Specifically, as soon as I click OK in the “Automatic GMail configuration” dialog: “Error on Gmail OAUTH2”. The “Setting up OAUTH2 authentication . . .” dialog is not displayed! In the English version, a similar error message appears when the “Setting up . . .” dialog is canceled using “Cancel process”: “Error validating Gmail account.” Mr. Fluet, perhaps you could assist your German Pegasus colleagues in fixing this error? In any case, I would like to thank you very much for your patience, which ultimately led to success. Best regards, Ekkehard Goebel

Ekkehard Goebel, Nürnberg - Germany

@Goebele, on 13 April I sent a request to my contacts requesting a Gmail button function check in the German version, referencing this discussion. I have just sent a follow-up messages containing the information you provided in your latest post. I will post anything I learn that does not get directly posted.

@Goebele, on 13 April I sent a request to my contacts requesting a Gmail button function check in the German version, referencing this discussion. I have just sent a follow-up messages containing the information you provided in your latest post. I will post anything I learn that does not get directly posted.

I have received word of a report on the German support mailing list that describes this same issue. I consider that confirmation of a problem that is now in front of folks who can implement a fix.


That poster found a workaround but the details are sketchy so I will provide what I believe should work. @Goebele, you get to decide whether you care to give this a try.

  • Create the Gmail OAUTH2 profile in the English version. This profile will be stored in a .OA2 file located in an \OAUTH2 directory of the mailbox. (eg C:\Pmail\MAIL\<user>\OAUTH2).
  • Copy the \OAUTH2 directory to the mailbox directory in a German version.
  • Use the Gmail button which should now offer "Definition creation" options.
  • Use that to create the desired definitions.

Edit:
If you do this, know that the Gmail "Revalidate" button will not work should you ever need it.
FWIW, I would use a Gmail app password instead of OAUTH2 until this is fixed.


I have received word of a report on the German support mailing list that describes this same issue. I consider that confirmation of a problem that is now in front of folks who can implement a fix. That poster found a workaround but the details are sketchy so I will provide what I believe should work. @Goebele, you get to decide whether you care to give this a try. - Create the Gmail OAUTH2 profile in the English version. This profile will be stored in a .OA2 file located in an \OAUTH2 directory of the mailbox. (eg C:\Pmail\MAIL\&lt;user&gt;\OAUTH2). - Copy the \OAUTH2 directory to the mailbox directory in a German version. - Use the Gmail button which should now offer &quot;Definition creation&quot; options. - Use that to create the desired definitions. Edit: If you do this, know that the Gmail &quot;Revalidate&quot; button will not work should you ever need it. FWIW, I would use a Gmail app password instead of OAUTH2 until this is fixed.
edited 3 days ago at 11:58 pm
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft