admin管理员组文章数量:1337212
I am using imap package in my project I have read the documentation and I found this for searching in email with date.
imap.search([ 'UNSEEN', ['SINCE', 'May 20, 2010'] ], function(err, results) {
});
I want to search email between two dates for example May 20, 2010 to May 28,2010.
So it possible to find between dates in imap protocol ?
I am using imap package in my project I have read the documentation and I found this for searching in email with date.
imap.search([ 'UNSEEN', ['SINCE', 'May 20, 2010'] ], function(err, results) {
});
I want to search email between two dates for example May 20, 2010 to May 28,2010.
So it possible to find between dates in imap protocol ?
Share Improve this question asked May 20, 2014 at 10:02 Waqas AhmedWaqas Ahmed 4931 gold badge5 silver badges24 bronze badges1 Answer
Reset to default 9Can you give reference to the module you refer to?
If you are using mscdex/node-imap, you can refer to
'BEFORE' - Messages whose internal date (disregarding time and timezone) is earlier than the specified date.
'SINCE' - Messages whose internal date (disregarding time and timezone) is within or later than the specified date.
in its API documentation https://github./mscdex/node-imap/blob/master/README.md#API
search(< array >criteria, < function >callback) - (void)
so to sum up
imap.search([ 'UNSEEN', ['SINCE', 'May 20, 2010'], ['BEFORE', 'May 28, 2010'] ],
function(err, results) {
});
is what you want ...
本文标签: javascriptSearching email in imap NodejsStack Overflow
版权声明:本文标题:javascript - Searching email in imap Node.js - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743370917a2493732.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论