1

I am trying to connect and fetch messages of my hosting's email address using imap_open(), but its throwing errors.

$server = '{mail.booksnearby.in:143/imap/ssl/novalidate-cert}INBOX';
$imap_connection = imap_open($server, $login, $password);
$mailboxinfo = imap_mailboxmsginfo($imap_connection);
$messageCount = $mailboxinfo->Nmsgs;

The above throws this error: Array ( [0] => Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Authentication failed.

If I change $server to

$server = '{mail.booksnearby.in:143}INBOX';

then it throws the following error
Certificate failure for mail.booksnearby.in: self signed certificate:

If $server is

$server = '{mail.booksnearby.in:143/imap/ssl/novalidate-cert}INBOX';
 it throws
 Array ( [0] => TLS/SSL failure for mail.booksnearby.in: SSL negotiation failed )

I can connect to the email account using an email client, with the same username password.

Help!

Thanks

I can't seem to telnet in as well. Its running apache , cpanel and dovecat. Imap with Ssl support is enabled on my hosting..

3
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by blocblue
0

This is a complete shot in the dark, but seeing as you've had no other replies, I'll post it anyway.

This post references the solution for self-signed certficates as being:

$server = '{mail.booksnearby.in:143/novalidate-cert}INBOX';

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.