问题
I'm trying to use imap_open() for my FatCow email account. Here's my code:
$mbox = imap_open("{imap.fatcow.com:143}", "account@domain.com", "password");
Here's what I receive:
Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.fatcow.com:143} in /home/alfatcom/public_html/test.php on line 2
Maybe the reason is that FatCow uses STARTTLS? Anyway, what am I doing wrong?
回答1:
In my case it was {domain:110/pop3/novalidate-cert}INBOX
that helped me in fixing both the CLOSED IMAP connection broken (server response) and Certificate failure for domain.
Confirm your ports and also whether you have ssl enabled using
openssl s_client -crlf -connect your-domain-name:port-number
来源:https://stackoverflow.com/questions/10784676/imap-open-cant-open-stream