|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-11 14:12 UTC] valerio at dei dot unipd dot it
imap_open($server_strings.$mailbox, $username,$passwd,$options) should return FALSE when username/password are correct but mailbox doesn't exist. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 01:00:01 2025 UTC |
This script output nothing (I mean _nothing_) when mailbox with name "this_file_doesnt_exist" isn't there. <?php print "BEFORE IMAP_OPEN<br>"; $my_stream=imap_open("{localhost:143}this_file_doesnt_exist","realusername", "rightpassword",OP_READONLY); if ($my_stream) { /* uncomment me if you want to see $my_stream value */ /*print $my_stream; */ $barney=imap_fetchbody($my_stream,1,"1"); print $barney; imap_close($my_stream); } print "AFTER IMAP_OPEN<br>"; ?> My current workaround is a imap_open("{localhost:143}",...,OP_HALFOPEN), imap_listmailbox and comparison on all values to check the existence of a particular mailbox name before opening it.