This is a discussion on PHP imap_expunge imap_close problem within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hello, I've searched the docs and online and can't find the solution to my problem. I'm running ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I've searched the docs and online and can't find the solution to my problem. I'm running PHP 4.0.6 on Mandrake Linux with Sendmail and I've deployed a PHP based webmail. Problem is that when I use the delete script it deletes two messages from the inbox (the message passed by url variable $num and the next message higher in number). The script I have now is posted below. Problem is that if I comment out the imap_close($mbox) the script works properly (only one message deleted). Any idea why? Is there a problem with not invoking imap_close()? Thanks for any help: $server = "127.0.0.1"; $mbox = @imap_open("{".$server.":110/pop3}INBOX", $username, $password); imap_delete($mbox, $num); imap_expunge($mbox); imap_close($mbox); |