I have the following code moving all emails in a folder to the "Old" folder using Mailbox package:
with MailBox('mail.yu.nl').login('75090058@yu.nl', 'yu', initial_folder='INBOX') as mailbox:
mailbox.move(mailbox.fetch(), 'Inbox.Old')
Now, I only want to move messages that have attachments in them.
I've tried the following:
resp, items = imap.uid("search",None, 'All')
resp, data = imap.uid('fetch',msg_uid, "(RFC822)")
However, with no success..
Please help!