IMAP: how to move a message from one folder to another

前端 未结 4 429
故里飘歌
故里飘歌 2020-12-28 16:44

(using the IMAP commands, not with the assistance of any other mail package)

4条回答
  •  攒了一身酷
    2020-12-28 17:05

    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
    

    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)

    See RFC 2060 for details.

提交回复
热议问题