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@xxxxxxxxx [db-3] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php