node-imap
node-imap copied to clipboard
Imap search between dates
As you know following code search email since may 20, 2010.
imap.search([ 'UNSEEN', ['SINCE', 'May 20, 2010'] ], function(err, results) {
});
Now I want to search between to dates For example May 20, 2010 to May 22, 2010
Is it possible to do this operation in imap ?
Thank You, Waqas Ahmed
Just use add the 'BEFORE' criteria:
imap.search([ 'UNSEEN', ['SINCE', 'May 20, 2010'], ['BEFORE', 'May 22, 2010'] ], function(err, results) {
});
Thanks ! It worked for me :)