imap_search not return anything

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Post Reply
_vipin.shrivastava_
Posts: 1
Joined: Fri Jul 30, 2021 4:26 am

imap_search not return anything

Post by _vipin.shrivastava_ »

Hello Team,
I am new to use zimbra. I want to fetch mail from the Zimbra server with the help of Imap. I am successfully able to make connection with zimbra but when it comes to fetching mail for one day it will return nothing. Please help me.

As I already tried all this with Gmail, Yahoo, or another mail server it works perfectly with this code.

Code: Select all

$imap = imap_open($server_host, $server_username, $server_password);
$date = date("j-M-Y", strtotime("-1 day")); 
$emailCollection = imap_search($imap, 'SINCE ' . $date);



this is my code, Please help me.

I am doing all this in PHP.

Thank you
Post Reply