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');

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s