The Little Guy Posted August 28, 2008 Share Posted August 28, 2008 For some reason, I can not delete any messages... $mbox = imap_open("{mail.dudeel.com/novalidate-cert}", "[email protected]", "abc123", OP_READONLY) or die("can't connect: " . imap_last_error()); $dir = 1; $smail = imap_sort($mbox,SORTDATE,$dir); if($smail){ foreach($smail as $msg){ imap_delete($mbox,$msg); } } imap_expunge($mbox); imap_close($mbox); What am I doing wrong? Link to comment https://forums.phpfreaks.com/topic/121623-solved-imap-delete/ Share on other sites More sharing options...
cooldude832 Posted August 28, 2008 Share Posted August 28, 2008 OP_READONLY and you want to delete? That makes no sense Link to comment https://forums.phpfreaks.com/topic/121623-solved-imap-delete/#findComment-627396 Share on other sites More sharing options...
The Little Guy Posted August 28, 2008 Author Share Posted August 28, 2008 Like this?? Can I have more than one? $mbox = imap_open("{mail.dudeel.com/novalidate-cert}", "[email protected]", "abc123", OP_READONLY CL_EXPUNGE); Link to comment https://forums.phpfreaks.com/topic/121623-solved-imap-delete/#findComment-627399 Share on other sites More sharing options...
cooldude832 Posted August 28, 2008 Share Posted August 28, 2008 How about no options Link to comment https://forums.phpfreaks.com/topic/121623-solved-imap-delete/#findComment-627401 Share on other sites More sharing options...
The Little Guy Posted August 28, 2008 Author Share Posted August 28, 2008 PERFECT! Link to comment https://forums.phpfreaks.com/topic/121623-solved-imap-delete/#findComment-627402 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.