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