How do I move emails into folders using the IMAP library in python?
Trying to move an email from one folder into another. I have the uid of the emails that I want to move.
with MailBox('imap.mail.com').login('test@mail.com', 'pwd', initial_folder='INBOX') as mailbox:
# MOVE all messages from current folder (INBOX) to folder2
mailbox.move(mailbox.fetch(), 'INBOX/folder2')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.