note 102198 modified in function.imap-mail-move by danbrown

From: Date: Wed, 02 Feb 2011 13:36:46 +0000
Subject: note 102198 modified in function.imap-mail-move by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176594@lists.php.net to get a copy of this message
To copy/move a mail in Gmail to a particular Folder like Starred/Spam/Drafts/Trash use the following statement and don't forget to call CL_EXPUNGE or imap_expunge($mbox) after it. <?php imap_mail_copy($mbox,'16','[Gmail]/Starred'); // 16 is the message number, which can also be a range.(ex: '1:15') imap_close($mbox,CL_EXPUNGE); ?> Incase u want to send it to a personally created Label/folder(ex: Test) use.. <?php imap_mail_copy($mbox,'16','Test'); imap_expunge($mbox); imap_close($mbox); ?> --was-- To copy/move a mail in Gmail to a particular Folder like Starred/Spam/Drafts/Trash use the following statement and don't forget to call CL_EXPUNGE or imap_expunge($mbox) after it. imap_mail_copy($mbox,'16','[Gmail]/Starred'); // 16 is the message number, which can also be a range.(ex: '1:15') imap_close($mbox,CL_EXPUNGE); Incase u want to send it to a personally created Label/folder(ex: Test) use.. imap_mail_copy($mbox,'16','Test'); imap_expunge($mbox); imap_close($mbox); http://php.net/manual/en/function.imap-mail-move.php

« previous php.notes (#176594) next »