1
votes

I'm trying to get emails through a PHP script:

$mbox = imap_open("{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX", "[email protected]", "password");

But I'm constantly getting this error:

Warning: imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX

IMap is enabled on my Google Account. From the server, I tried nmap -p 993 imap.gmail.com and it return that there is imap service under this address.

regards

1
Did you make sure that you allow Less Secure Apps to access your gmail account? - Jarek.D
Yes I'm sure... - FindL
novalidate-cert may not be required tried removing it? - Vinay

1 Answers

0
votes

In my case, this error is caused by the outbound proxy blocking access to port 993.