Im running PHP 5.1.1 + Apache 2.0.55 on Windows XP Pro.
IMAP and SSL are enabled.
IMAP c-Client Version : 2004
openssl : OpenSSL 0.9.8a 11 Oct 2005
The files ssleay32.dll and libeay32.dll exists in C:\Windows\System32 folder.
I even tried with pop.gmail.com:995/pop3/ssl/novalidate-cert/

set_time_limit(10000);
error_reporting(E_ALL);

$msgid = 1;

$mbox = imap_open("{pop.gmail.com:995/pop3/ssl}INBOX", "username@gmail.com", "password");
if ( $mbox === FALSE )
 {
         echo imap_last_error()';
         die();
 }

$check = imap_check($mbox);
print_r($check);
imap_close($mbox);

Yet I get the error msg immediately - Im guessing no packet is being sent because this msg comes atonce :

Warning:  imap_open() [function.imap-open]: Couldn't open stream {pop.gmail.com:995/pop3/ssl}INBOX in C:\xxx\htdocs\gmail.php on line n

Can't open mailbox {pop.gmail.com:995/pop3/ssl}INBOX: invalid remote specification

Notice:  Unknown: Can't open mailbox {pop.gmail.com:995/pop3/ssl}INBOX: invalid remote specification (errflg=2) in Unknown on line 0

Any idea why it still doesnt work ?

Thanks

    Im pretty sure I had this working a few months ago. I did enable POP in gmail and Im using pop3 settings in the imap_open argument.

      True, but

      $mbox = imap_open("{pop.gmail.com:995/pop3/ssl/novalidate-cert}INBOX", "username@gmail.com", "password");

      is like accessing pop directly and not IMAP.

        ok, well i dont know then.

        all i know is ive had trouble getting onto gmail even through just outlook or any other pop3 email program. Thats how i knew what i said above as ive researched it recently

          Write a Reply...