we have a custom written web-based mail client which, when on the
settings page of the website, displays the message:
"imap_list failed: '18 is not a valid IMAP resource'"
when examining the error logs, we find this:
18 is not a valid imap resource in
/home/web/domain.com/public/lib/pm_settings_body.php on line 45
and lines 45 through 56 of the php page where this occurs is here:
[45] $list = imap_list($pm_connection, "{localhost:143/notls}", "INBOX.*");
[46] if (is_array($list)) {
[47] reset($list);
[48] while (list($key, $val) = each($list)) {
[49] list($junk, $mbox) = split("\.", imap_utf7_decode($val) );
[50] if($mbox != "Trash" && $mbox != "Drafts" && $mbox != "Sent") {
[51] $del_options .= "<option value=\"$mbox\">$mbox\n";
[52] }
[53] }
[54] } else {
[55] echo "imap_list failed: " . imap_last_error() . "\n";
[56] }
I do not understand why this would be causing an error message or how
to fix it. I will provide additional information needed to fix this
problem, and will consider this question answered ONLY when the
scripting works properly on the website where it exists. Generous tip
available, and will be contingent upon speed and detail of reply. Note
that I am excellent at following directions, but am not at all a
programmer, so please respond with either explicit instructions or in
layman terms. Also, when done answering this question, please note how
much time you spent on answering it. Thanks! |
Clarification of Question by
pancaketj-ga
on
22 Nov 2004 16:14 PST
sorry! there's a typo in the above question. on the settings page of
the website, the error message is NOT "imap_list failed: '18 is not a
valid IMAP resource'"
I pasted incorrectly, and apologize for any confusion.
The actual message received seems to vary, based upon where I last
navagated on the website.
If the last place I was at was the inbox, then the error message reads:
"imap_list failed: [CLOSED] IMAP connection broken (server response)"
If the last place I was at was in any other mail folder, then the
error message reads:
"imap_list failed:"
If the last place I was at was the catchall account, then the error message reads:
"imap_list failed: SELECT failed: Can't open mailbox CATCHALL: no such mailbox"
|