是否根据日期和时间检索IMAP电子邮件? [英] Retrieve IMAP email based on date AND time?

查看:394
本文介绍了是否根据日期和时间检索IMAP电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用不到一定小时数的IMAP检索电子邮件。我查看了规范,并且有一个SINCE方法可以接受RFC日期。但是,它忽略了时间和时区。我还可以使用其他方法根据日期和时间来检索电子邮件吗?谢谢

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 RFC date. However, it ignores the time and timezone. Is there another method I can use to retrieve email based on date as well as time? Thanks

推荐答案

RFC 5032 记录了WITHIN扩展名,该扩展名引入了您正在寻找的搜索关键字 YOUNGER

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

例如,搜索不到2小时的所有电子邮件:

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

a SEARCH YOUNGER 7200

这篇关于是否根据日期和时间检索IMAP电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆