Ruby IMAP “changes” since last check

后端 未结 2 984
暗喜
暗喜 2021-02-10 14:51

I\'m working on an IMAP client using Ruby and Rails. I can successfully import messages, mailboxes, and more... However, after the initial import, how can I detect any changes t

2条回答
  •  执笔经年
    2021-02-10 15:21

    The IMAP protocol is brain dead this way, unfortunately. IDLE really should be able to return this kind of stuff while connected, for example. The FETCH FLAGS suggestion above is the only way to do it.

    One thing to be careful of, however, is that UIDs are only valid for a given session per the spec. You should not store them, even if some servers persist them.

提交回复
热议问题