如何在node.js中将未标记的电子邮件标记为使用node-imap看到的 [英] how to mark unseen email as seen with node-imap in node.js
问题描述
我想接收电子邮件,并用 node-imap 标记为看不见的电子邮件.我已经收到了邮件,但是我不知道如何将电子邮件标记为看不见.该API提供的功能似乎是在示例var f = imap.fetch(results, { markSeen : true });替换代码var f = imap.fetch(results, { bodies: '' });
. >,但似乎不起作用.我该怎么办?
i want to recieve email and mark email unseen as seen with node-imap. the recieving i have done, but i don't know how to mark email unseen as seen. the API offers a function seems like replace the code var f = imap.fetch(results, { bodies: '' });
with var f = imap.fetch(results, { markSeen : true });
in the example,but it seems doesn't work. what should i do?
推荐答案
哦,我有解决方案.是我以只读模式打开邮箱的错误,这就是为什么我无法修改邮件的状态.imap.openBox('INBOX', false, cb);
第二个参数false
表示打开邮箱不在只读模式.
oh, i'va got solution. it's my fault to open mailbox in read-only mode, that's why i couldn't modify the mail's status.imap.openBox('INBOX', false, cb);
the second args false
means open mailbox not in read-only mode.
这篇关于如何在node.js中将未标记的电子邮件标记为使用node-imap看到的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!