I use the following code to extract all emails from 1 day less -
$yesterday = date("Y-m-d", strtotime ("-1 days"));
$searchQuery = 'SINCE "'.$yesterday.'"';
if($this->open($folder)) {
$imap_search = imap_search($this->_imap, $searchQuery);
}
This works fine on my computer with dev machines, but when I put it on a test production server, it doesn't work. I even tried ALL as a search parameter, but it didn't seem to extract anything. The connection to the mail account (object $ this → _ imap) seems fine.
Any ideas?
source
share