Deleting using google IMAP (python, imaplib)
-
28-09-2019 - |
문제
When I use google IMAP and try to delete message the message removes from folder but not going to trash folder. Did i must to copy this message before delete it?
해결책
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.
다른 팁
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.
제휴하지 않습니다 StackOverflow