Monthly Archives: November 2013

Solve PHP imap_open Invalid Certificate Failure

Lets say, I have a following configuration:

Incoming Server:
IMAP Port: 143
Password: userpass

But having error while trying to connect inbox, like following code:

$inbox = imap_open('{}INBOX', '', 'userpass');

Can't open mailbox {}INBOX: invalid remote specification

The solution is to use a flag “/novalidate-cert”. Its purpose is “do not validate certificates from TLS/SSL server, needed if server uses self-signed certificates”.

So this will be right call:

$inbox = imap_open('{}INBOX', '', 'userpass');