且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

IMAP:如何将邮件从一个文件夹移动到另一个文件夹

更新时间:2022-12-03 21:45:24

我不确定您对imap的了解程度如何,但是基本上在登录后,选择"源邮箱,复制"消息,然后删除"邮件(如果旧邮箱现在为空,则删除"旧邮箱:-).

I'm not sure how well-versed you are in imap-speak, but basically after login, "SELECT" the source mailbox, "COPY" the messages, and "EXPUNGE" the messages (or "DELETE" the old mailbox if it is empty now :-).

a login a s
b select source
c copy 1 othermbox
d store 1 +flags (\Deleted)
e expunge

将是要发送的消息的示例. (注意:imap消息在每个命令之前都需要一个uniqe前缀,因此,前面应是"a b c")

would be an example of messages to send. (Note: imap messages require a uniqe prefix before each command, thus the "a b c" in front)

有关详细信息,请参见 RFC 2060 .

See RFC 2060 for details.