newbie with imap_mail_move

From: Date: Sun, 10 Feb 2013 00:29:11 +0000
Subject: newbie with imap_mail_move
Groups: php.general 
Request: Send a blank email to php-general+get-320176@lists.php.net to get a copy of this message
Hi all, I'm a newbie with imap_mail_move trying to open the INBOX and move all mail to LEGACY folder box.... (got this code from the net) it shows these errors... any idea how to fix this....? --------------- Warning: reset() [function.reset]: Passed variable is not an array or object in /home/bbeast/public_html/emtest/em-move.php on line 91 Warning: implode() [function.implode]: Invalid arguments passed in /home/bbeast/public_html/emtest/em-move.php on line 92 Notice: Unknown: Error in IMAP command received by server. (errflg=2) in Unknown on line 0 ------- <?php $host1='{mail.xxx.com:993/ssl/novalidate-cert}INBOX'; $user='xxx'; $pass='xxx'; $mbox=@imap_open($host1,$user,$pass) or die("Can't connect: " . imap_last_error()); $mbox_name = "INBOX"; $newmbox_name = "LEGACY"; if ($mbox_name != $newmbox_name) { reset($msg_no); $messageset = implode (",",$msg_no); imap_mail_move($mbox,$messageset,$newmbox_name); imap_expunge($mbox); } imap_close($mbox); ?> -- Thanks, Dave - DealTek dealtek@gmail.com [db-3]

« previous php.general (#320176) next »