note 103762 deleted from function.imap-open by cmb
| From: | cmb@php.net | Date: | Sun, 18 Aug 2019 08:40:57 +0000 |
| Subject: | note 103762 deleted from function.imap-open by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211937@lists.php.net to get a copy of this message | ||
Note Submitter: ph at hotmail dot fr
----
For those having issues with Gmail (my problem was : "too many login failures" on a
webserver, but no problem on localhost..), instead of opening with :
$inbox = imap_open($hostname,$username,$password,NULL,1) or die('Cannot connect to Gmail:
' . imap_last_error());
Use :
$inbox = imap_open($hostname,$username,$password,NULL,1) or die('Cannot connect to Gmail:
' . print_r(imap_errors()));
You will be able to see the full list of errors that happened, and hopefully it will guide you to an
answer.
In my case, Google wanted me to unlock my account by typing in a captcha. But this error wasn't
clearly shown through imap_last_error().
Cheers,
PH