Closed j3g closed 3 years ago
I am having trouble marking an email as READ. I try to set the flag for the UID to "\Seen". Am I doing it wrong or is this a bug.
addFlags([], "\Seen");
async function flagMsg(mailbox, uid, flag) { try { console.log("[flagMsg]", mailbox, uid, flag); const con = await imaps.connect(globs.imapUser); await con.openBox(mailbox); const ret = await con.addFlags(uid, flag); console.log("[flagMsg]", ret); await con.end(); } catch (ex) { console.error(ex); } }
why can't I get the code formatting to work...?
I am having trouble marking an email as READ. I try to set the flag for the UID to "\Seen". Am I doing it wrong or is this a bug.
addFlags([], "\Seen");
async function flagMsg(mailbox, uid, flag) { try { console.log("[flagMsg]", mailbox, uid, flag); const con = await imaps.connect(globs.imapUser); await con.openBox(mailbox); const ret = await con.addFlags(uid, flag); console.log("[flagMsg]", ret); await con.end(); } catch (ex) { console.error(ex); } }