Ruby IMAP “changes” since last check

后端 未结 2 2119
隐瞒了意图╮
隐瞒了意图╮ 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 14:56

    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.

提交回复
热议问题