PHP imap_open not working

624

I'm getting an error:

Warning: imap_open() [function.imap-open]: Couldn't open stream {pop3.live.com:995/pop3/ssl/novalidate-cert}INBOX in /home/.../imap.php on line 3

when using code:

$mbox = imap_open('{pop3.live.com:995/pop3/ssl/novalidate-cert}INBOX', '<user>', '<pass>');
122

Answer

Solution:

Your URL has pop3 for a sub-domain. Are you sure that IMAP is available (ports 143 or 993 open)?

Doing a quick search, it looks like imap has to be enabled on your live.com account. Are you able to IMAP to the server using a standard mail client, like Thunderbird?

Also, you are pointing to pop3.live.com on port 995, which is a POP3 port, not an IMAP port.

676

Answer

Solution:

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

People are also looking for solutions to the problem: php - How to get Laravel rows randomly, from filtered rows?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.