0
我正在写一个小的imap类,想要获取在过去一小时内收到的邮件,但找不到解决方案。PHP imap - 获取最近一小时收到的邮件
我发现的imap_search()
这是工作,但仅限于日期的可能性:
$date = date ("d M Y", strToTime ("- 1 days"));
$this->date = imap_search ($connection, "SINCE \"$date\"");
在做
$date = date ("d M Y h:i", strToTime ("- 1 hours"));
$this->date = imap_search ($connection, "SINCE \"$date\"");
它给我的examt相同的结果与第一种方法,但不仅仅是过去一小时收到的消息。对于
g 12-hour format of an hour without leading zeros 1 through 12
G 24-hour format of an hour without leading zeros 0 through 23
h 12-hour format of an hour with leading zeros 01 through 12
H 24-hour format of an hour with leading zeros 00 through 23
i Minutes with leading zeros 00 to 59
s Seconds, with leading zeros 00 through 59
同样的结果是否有人知道我能试试吗?
谢谢!我也想过UID。我一直在寻找获得它们的最简单方法,你能说出它的名字吗? – baao 2014-11-06 23:50:18
UID搜索UID(lastuidyouhave):* – Max 2014-11-06 23:56:03
太棒了,再次感谢! – baao 2014-11-06 23:56:52