IMAP

From: Date: Thu, 29 Mar 2001 13:49:44 +0000
Subject: IMAP
Groups: php.windows 
Request: Send a blank email to php-windows+get-6369@lists.php.net to get a copy of this message
I am trying to check the number of new messages in an IMAP mailbox, I ma using this code but it doesn't seem to work, the username, password, host etc are correct, but still no cigar...any ideas? Thanks $mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN) || die("can't connect: ".imap_last_error()); $status = imap_status($mbox,"{your.imap.host}INBOX",SA_ALL); if($status) { print("Messages: ". $status->messages )."<br>\n"; print("Recent: ". $status->recent )."<br>\n"; print("Unseen: ". $status->unseen )."<br>\n"; print("UIDnext: ". $status->uidnext )."<br>\n"; print("UIDvalidity:". $status->uidvalidity)."<br>\n"; } else print "imap_status failed: ".imap_lasterror()."\n"; imap_close($mbox); -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: BenC@intasept.com Web: http://www.intasept.com "MAKING sense of the INFORMATION TECHNOLOGY age @ WORK......"

« previous php.windows (#6369) next »