4
votes

I try to open an IMAP connection via PHP

imap_open ("{localhost:993/ssl}", "username", "pwd")

ok, this doesn't work as expected, cause I'm using a self-signed cert. But at least I got an error:

Warning .... Couldn't open stream

So I try

imap_open ("{localhost:993/ssl/novalidate-cert}", "username", "pwd")

And then: nothing - white page - no errors or warning, no errors in serverlog.

The mailserver is correctly configured - it's no problem to connect via thunderbird or outlook with enabled ssl-encryption on this port.

I also tried to connect with imap_open and ssl and novalidate-cert to 127.0.0.1, to the hostname, to the IP-address -none of these trials works as soon as I add the novalidate-cert parameter. I've no idea why.

I've also checked php_info: SSL is enabled for IMAP and also openssl is active.

If I connect without SSL everything works fine. Thank you very much for your help

1

1 Answers

0
votes

Try to add imap before ssl , it should be like :

imap_open ("{localhost:993/imap/ssl/novalidate-cert}", "username", "pwd")