PHP IMAP mail question

Hi all,

Another question xD

I’m trying to implement inbox checking for my web application, but I’m having little success…

My PHP block below should be connecting to my web applications mail server and grabbing info that I can use later, but for testing this is all I needed.


<?php $mbox = imap_open("{MAIL.MYDOMAIN.COM}INBOX", "USER@MYDOMAIN.COM", "PASSWORD") or die("can't connect: " . imap_last_error()); $check = imap_mailboxmsginfo($mbox); if ($check) { echo "Date: " . $check->Date . "
\n" ; echo "Driver: " . $check->Driver . "
\n" ; echo "Mailbox: " . $check->Mailbox . "
\n" ; echo "Messages: " . $check->Nmsgs . "
\n" ; echo "Recent: " . $check->Recent . "
\n" ; echo "Unread: " . $check->Unread . "
\n" ; echo "Deleted: " . $check->Deleted . "
\n" ; echo "Size: " . $check->Size . "
\n" ; } else { echo "imap_check() failed: " . imap_last_error() . "
\n"; } imap_close($mbox); ?>[/php]

It’s coming up with the following error message:

[quote]Warning: imap_open() [function.imap-open]: Couldn’t open stream {MAIL.MYDOMAIN.COM}INBOX in /home/HOSTUSER/MYDOMAIN.COM/folder/folder/imap.php on line 3
can’t connect: Certificate failure for MAIL.MYDOMAIN.COM: Server name does not match certificate: /C=US/postalCode=92821/ST=California/L=Brea/street=417 Associated Rd/O=Dreamhost Web Hosting/OU=admins/OU=Provided by New Dream Network, LLC/OU=DreamHost Premium Wildcard SSL/CN=*[/quote]

Any ideas what this means and how I can resolve it?


PS/ I’ve sanitized domains, user and password - but for any DH guys, it’s for OpenPOS.
I’ve had a go at the help here;

But I still get the mismatch after I change the server to

Is it possible that because I’m connecting from behind an SSL connection with my domain already, that it’s kicking the certificate for dreamhost out?