简体   繁体   English

python的imaplib中IMAP命令“UID COPY”的响应不正确?

[英]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: 1. 我正在使用 telnet 连接将一个 email 从收件箱复制到存档:
. uid copy 1102 "[Gmail]/All Mail"
. OK [COPYUID 646471928 1102 1237] (Success)

2. The same account, copying other message to Archive: 2. 同一个账号,将其他消息复制到存档:
... creating IMAP4_SLL instance, logging in, etc... ...创建 IMAP4_SLL 实例、登录等...
res = mserver.uid("copy", "1107", "[Gmail]/All Mail")
print res

in output i got:在 output 我得到:
('OK', [None])

So, who is wrong?那么,谁错了? I need new UID for message, that was just copied.我需要新的 UID 消息,刚刚复制。 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. IMAP 标准没有指定新消息的 UID 将由 COPY 命令返回。 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.但是,它确实指定新消息应保留日期和标志,因此您可以编写一些逻辑来在新文件夹中查找新副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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