Retrieve IMAP email based on date AND time?

前端 未结 1 1073
借酒劲吻你
借酒劲吻你 2021-01-18 19:02

I\'m trying to retrieve email using IMAP that\'s less than a certain number of hours old. I\'ve looked over the specifications, and there is a SINCE method that accepts an

1条回答
  •  终归单人心
    2021-01-18 19:48

    RFC 5032 documents the WITHIN extension which introduces the search keyword YOUNGER, which is what you're looking for.

    For example, to search for all emails less than 2 hours old:

    a SEARCH YOUNGER 7200
    

    0 讨论(0)
提交回复
热议问题