skip deleted mails
This commit is contained in:
parent
485b07f797
commit
d000e36ed7
@ -155,6 +155,8 @@ ImapProbe.prototype._scanBox = function (needle, callback) {
|
||||
that._fetchMessage(box.messages.total--, function (error, message) {
|
||||
if (error) return iteratorCallback(error);
|
||||
|
||||
if (message.attributes.flags.indexOf('\\Deleted') !== -1) return iteratorCallback(); // skip deleted
|
||||
|
||||
if (!searchMessage(message, needle)) return iteratorCallback(); // continue to next message
|
||||
|
||||
matchedMessage = message;
|
||||
|
Loading…
Reference in New Issue
Block a user