PHP Classes

Password error: [AUTH] Authentication failed

Recommend this page to a friend!

      POP3 e-mail client  >  All threads  >  Password error: [AUTH]...  >  (Un) Subscribe thread alerts  
Subject:Password error: [AUTH]...
Summary:Testing POP3 class - authentication failed
Messages:8
Author:David
Date:2022-09-29 22:06:05
 

  1. Password error: [AUTH]...   Reply   Report abuse  
Picture of David David - 2022-09-29 22:06:05
Hi,
When testing the pop3 class, using "test_pop3.php" on linux, I get the following error message:-

Connecting to localhost ...
S +OK Dovecot ready. <5ae1.1.6336149c.rZkUFKxpfmFXbhRnI/W9pw==@othmdw416>

Connected to the POP3 server "localhost".

C USER myUSER
S +OK
C PASS MY_Correct_password
S -ERR [AUTH] Authentication failed.
Error: Password error: [AUTH] Authentication failed.

Please help. I really need to access gmail with this class.
Regards,
David

  2. Re: Password error: [AUTH]...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2022-09-29 22:49:15 - In reply to message 1 from David
Hello David,

Gmail is requiring that people that use Gmail for free use OAuth authentication support.

I plan to add that support over the weekend. Can you wait until Monday so I have time to add OAuth support?

  3. Re: Password error: [AUTH]...   Reply   Report abuse  
Picture of David David - 2022-09-29 22:51:06 - In reply to message 2 from Manuel Lemos
Many thanks,Manuel, for this and all your great work!
Regards

  4. Re: Password error: [AUTH]...   Reply   Report abuse  
Picture of David David - 2022-10-05 23:51:26 - In reply to message 3 from David
Hi Manuel,

Many thanks for the update.

However, I have downloaded the new files and tried it again. It is still displaying the same error message.

If I uncomment require("sasl.php"), it displays a blank page.

Am I doing something wrong?

  5. Re: Password error: [AUTH]...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2022-10-06 03:39:05 - In reply to message 4 from David
Hello David,

The necessary changes are not yet completed because they require more work. That is why I did not yet reply to you.

The SASL package is updated, and it supports XOAUTH2 authentication mechanism. That allows the SASL package to authenticate using an OAuth 2 access token. This is already tested in my development environment.

What remains to be done is adding a script to allow you to get the OAuth 2 token to use with the POP3 client and SASL classes.

You can use one of the scripts to log in with Google from this OAuth client package and change them to get the token.

phpclasses.org/package/7700-PHP-Aut ...

Or, if you can wait, I can send a commented script so you can adapt it to your application.

Can you wait maybe a few more days, or do you prefer to use a script for the OAuth class?

  6. Re: Password error: [AUTH]...   Reply   Report abuse  
Picture of David David - 2022-10-06 07:06:55 - In reply to message 5 from Manuel Lemos
Hello Manuel,

Thank you for your reply.

I prefer to wait. Take your time :)

  7. Re: Password error: [AUTH]...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2022-10-11 15:35:32 - In reply to message 6 from David
Hello David,

I have added support to the SASL package to authenticate using the XOAUTH2 mechanism necessary to support Gmail POP3 server access for free users.

You need to use this script to get an OAuth access token with the POP3 client class:

phpclasses.org/package/2-PHP-Access ...

There is documentation here to create a Google application so you can retrieve the access token that is needed to pass to the POP3 class to authenticate.

phpclasses.org/browse/file/327263.h ...

Can you try to follow these instructions and check if you can access the Gmail POP3 client and then let me know if you have any difficulty?

  8. Re: Password error: [AUTH]...   Reply   Report abuse  
Picture of David David - 2022-10-16 20:41:53 - In reply to message 7 from Manuel Lemos
Hello Manuel,

Many tanks for your time and effort.

I will need a couple of days or so to digest the information, and will let you know if I need further help.

Kind regards,

David