Using IMAP

I have written an app reading IMAP with use of the MBS CURL plugin. Works like a charm but now I want to copy / delete the mails. Is there someone that has a clue what the syntax has to be used for such a operation.

For deleting mails you need to set the deleted flag. Here is the Python code I’m using at the moment: - 1), ‘+FLAGS’, ‘\\Deleted’)

Of course, Gmail is different. There you need to move the message to the trash mailbox. Since the mailboxes are localized you need to read the flags of the mailboxes to find out which mailbox is the trash mailbox.

For copying there should be a copy command.