Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication failed for a Gmail account #109

Closed
ko-dever opened this issue Mar 2, 2016 · 4 comments
Closed

Authentication failed for a Gmail account #109

ko-dever opened this issue Mar 2, 2016 · 4 comments

Comments

@ko-dever
Copy link

ko-dever commented Mar 2, 2016

Hi everybody,

I was testing your library with my professional Office 365 account, it's working fine (at least, I can get a listing of all my emails).

But when I want to do some tests with my personal Gmail account (with exactly the same code), I get stuck with the error :
Fatal error: Uncaught exception 'Ddeboer\Imap\Exception\AuthenticationFailedException' with message 'Authentication failed for user [email protected] ...

on the line :

$connection = $server->authenticate( ... );

I checked my Gmail settings, IMAP enabled, "Less secure apps" turned on, ... I don't understand.
I was thinking, maybe it's because my password contains some "fancy" characters ( / , `, ' , and others) but Gmail always accepted it.

Do you have any idea? Thanks.

@ko-dever
Copy link
Author

ko-dever commented Mar 2, 2016

After some refreshes, and "On / Off / On / Off" for Less secure apps, it's working now...
Sorry for this useless issue. Have a good day!

@ko-dever ko-dever closed this as completed Mar 2, 2016
@aginev
Copy link

aginev commented May 31, 2016

For the people that have same issue here is the link for enabling the less secure apps for Gmail Accounts: https://www.google.com/settings/u/4/security/lesssecureapps

Keep in mind that Gmail Accounts with two step verification can not be used in that manner.

@Pream-webapps
Copy link

For the people that have same issue here is the link for enabling the less secure apps for Gmail Accounts: https://www.google.com/settings/u/4/security/lesssecureapps

Keep in mind that Gmail Accounts with two step verification can not be used in that manner.

Can you please let me know how to get two step verification mail box

@Slamdunk
Copy link
Collaborator

Slamdunk commented Dec 8, 2020

Keep in mind that Gmail Accounts with two step verification can not be used in that manner.

This is completely the opposite, with 2FA enabled, you can create app password which works with php IMAP, see https://support.google.com/mail/answer/185833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants