简体   繁体   中英

Incorrect response for IMAP command “UID COPY” in python's imaplib?


here is my goal:
1. I'm using telnet connection for copying one email from Inbox to Archive:
. uid copy 1102 "[Gmail]/All Mail"
. OK [COPYUID 646471928 1102 1237] (Success)

2. The same account, copying other message to Archive:
... creating IMAP4_SLL instance, logging in, etc...
res = mserver.uid("copy", "1107", "[Gmail]/All Mail")
print res

in output i got:
('OK', [None])

So, who is wrong? I need new UID for message, that was just copied. Thanks for your attention.

This is not an incorrect response. The IMAP standard does not specify that the UID of the new message is to be returned by the COPY command. It do, however, specify that the new message shall have the date and flags preserved, so you can write some logic to find the new copy in the new folder.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM