I am trying to update flag of a email message from offcie 365 account from 'seen' to 'unseen' using node imap. I don't get any error but the message still remains seen. Same code works for Gmail. Similar logic works for office 365 for flagging a message with 'flag' and to mark message as 'seen'.
Any idea why 'seen' to 'unseen' doesn't works for Office ? Below is my code snippet
imap.setFlags(seqno, 'UNSEEN', function(err) { //Tried Unseen, unseen etc..
if (err) return err;
imap.closeBox(function(err) {
if (err) return err;
imap.logout();
});
});