php - imap_open(): Couldn't open stream -
i trying access gmail inbox using imap. have applied possible solutions available here , in google. facing same issue.
below code :
$hostname = "{imap.gmail.com:993/imap/ssl/novalidate-cert}"; $mailbox = imap_open($hostname, 'my gmail account', 'my gmail password'); if ($mailbox) { echo 'if'; } else { echo 'else'; } exit;
when run code in local system give me message :
warning: imap_open(): couldn't open stream {imap.gmail.com:993/imap/ssl/novalidate-cert} in d:\xampp\htdocs\php-imap-mailboxes\test-mail.php on line 4
else
notice: unknown: [alert] please log in via web browser:https://support.google.com/mail/accounts/answer/78754
(failure) (errflg=1) in unknown on line 0
notice: unknown: [alert] please log in via web browser:https://support.google.com/mail/accounts/answer/78754
(failure) (errflg=1) in unknown on line 0
notice: unknown: [alert] please log in via web browser:https://support.google.com/mail/accounts/answer/78754
(failure) (errflg=1) in unknown on line 0
notice: unknown: many login failures (errflg=2) in unknown on line 0
i running script in local system. please me in have spent lot's of time in issue.
thanks, ali
make sure have openssl installed.
here related discussion on google groups. https://groups.google.com/forum/#!topic/comp.lang.php/jb5hm8cki_q
Comments
Post a Comment