Deleting using google IMAP (python, imaplib)
When I use google IMAP and try to delete message the messag开发者_运维问答e removes from folder but not going to trash folder. Did i must to copy this message before delete it?
With the new Gmail advanced IMAP controls you can now set messeges that are deleted over imap to be moved to the bin.
Just enable "Advanced IMAP Controls" in Gmail Labs, and then set the settings IMAP settings like this:
Then when you mark a message as deleted and expunge as per this answer it will be moved to the bin.
Simple answer: yes.
There is no concept of Deleted Items, Trash, etc. in IMAP. If you want to have a message in one of those folders after deletion, you have to copy it.
精彩评论