|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-12-26 11:40 UTC] katz at advanced dot org
The 'imap_status' function seems to not be working anymore. An strace of a run using imap commands shows imap_open properly opening the connection and logging in.. other imap commands running fine, but when imap_status runs it tries to log into the mailbox with incorrect parameters, using {\d}, (ie, {4}, {5}, etc...) in place of things like the mailbox name, userid, password, etc... The result is multiple "login incorrect" messages as it tries a few times to log in.. The command worked fine in 4.0.3 (all code with the command stopped working in 4.0.4)..
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
$server = "<server>:143"; $login = "<login>"; $password = "<password>"; $im = imap_open("\{$server}",$login,$password); $stat1 = (int)imap_ping($im); $stat2 = (int)imap_status($im,"\{$server}INBOX",SA_ALL); $stat3 = (int)imap_ping(im); $stat4 = (int)imap_status($im,"\{$server}INBOX",SA_ALL); $stat5 = (int)imap_mailboxmsginfo($im); print "Info: $im,$stat1,$stat2,$stat3,$stat4,$stat5\n"; ...... under PHP 4.0.3pl1 the previous would give: Info: 1,1,1,1,1,1 under PHP 4.0.4 it gives: Info: 1,1,0,1,0,1 (I cast everything to ints just to see if the functions were working .. without them the 0's came up as nulls and 1's for status/mailboxmsginfo came up as 'Object's..) So.. opening the server connection works pinging the connection works imap_status failes under 4.0.4 imap_mailboxmsginfo works For now i'm just using the mailboxmsginfo after running a bunch of re-opens to change the current mailbox for checking the status .. I would prefer the cleaner imap_status though :)