if (isset($msg[$i])) {
/** check if they would like to move it to the trash folder or not */
sqimap_messages_copy($imapConnection, $msg[$i], $msg[$i], $targetMailbox);
if (isset($msg[$i])) {
/** check if they would like to move it to the trash folder or not */
sqimap_messages_copy($imapConnection, $msg[$i], $msg[$i], $targetMailbox);