It's already several days that we have started experience issues with imap_open
function when try to connect to imap.gmail.com
it returns:
Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Invalid credentials (Failure)
Here is the sample of the code that I try to run:
imap_open("{imap.gmail.com:993/imap/ssl}INBOX", username, password, NULL, 1);
Can this be an issue with the versions of PHP/Open SSL? If yes how can I solve it?
There are two possible reasons:
1-Credentials are incorrect.
2-Gmail do not authorize imap for unrecognized web apps, you should enable this fact here gmail enable less secure apps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With