0
votes

I am using swift mailer to send mails. In senders sent Folder email is added. How to avoid adding mail in sent folder and add them in another folder of gmail.

I have checked the imap_append function to copy mail in another folder, but in that case 2 mails are in sent folder and 2 mails in the 'xxxx' folder of gmail mailbox. Is there any another way?

1

1 Answers

1
votes

You shoud use imap_mail_move to move message to another folder.

http://php.net/manual/en/function.imap-mail-move.php