I have part of a script that move emails from one folder to another folder within the same account. However, when I tried to move one email from one to the another, it's showing me the following errors below. There are two ways in which I've tried.
Option 1 (sending email one by one):
with Mailbox(email_server).login(email_account,email_password,email_folder) as mailbox:
for msg in mailbox.fetch():
res = mailbox.move(msg.uid, destination_folder)
Option 2 (send all emails):
with Mailbox(email_server).login(email_account,email_password,email_folder) as mailbox:
print(' - {}'.format(mailbox.move(mailbox.fetch(), '"{}"'.format(destination_folder))))
Additionally, may I check with you if mailbox.uids() still exist? Because I was also trying to move emails by IDs but there was an error message that it does not exist.
Thanks