Imap/Gmail mark as read

I’ve “updated” my previous php-app.

Since today I ended up getting this error:

Warning: imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}[Google Mail]/Spam in /home/yeri/.gmail.php on line 30
Certificate failure for imap.gmail.com: unable to get local issuer certificate: /C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com - Connection failed.

Simply searching this line:

$open = imap_open ("{imap.gmail.com:993/imap/ssl/}$path"

And editing it to:

$open = imap_open ("{imap.gmail.com:993/imap/ssl/novalidate-cert}$path"

Solves the problem.

This will ignore the Google certificate. Please do double check that imap.google.com really points to Google, and it’s not some kind of DNS issue.

I’ve updated the 1st version, that ignores the certificate.


Posted by

in

, , , ,

Comments

One response to “Imap/Gmail mark as read”

  1. […] Google changed their Mailbox names (from Google Mail, to Gmail) so here is the update from my previous php script I made a few years ago. […]

Leave a Reply…