You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to change \Seen flag in an email message but I'm unable to no matter how hard I try ...
I'm using gmail account for testing.
require('dotenv').config();constconfig=require('./config');constImapClient=require('emailjs-imap-client').default;constclient=newImapClient(config.host,config.port,config.options);constgetMessages=async(id)=>{returnawaitclient.listMessages('INBOX',id,['uid','flags','body[]']);};constprintMessages=(messages)=>{console.log(`Num of messages: ${messages.length}`);messages.forEach((message)=>{if(message.uid===undefined){console.trace(message);returnnull;}console.log('Flags for '+message.uid+': '+message.flags.join(', '))});};constmain=async()=>{awaitclient.connect();printMessages(awaitgetMessages(7));printMessages(awaitclient.setFlags('INBOX',7,{remove: ['\\Seen']}));printMessages(awaitclient.setFlags('INBOX',7,{remove: ['\Seen']}));printMessages(awaitgetMessages(7));awaitclient.close();};main().catch(err=>console.error(err));
Output:
Num of messages: 1
Flags for 7: \Seen
Num of messages: 1
Trace: { '#': 7, flags: [] }
at messages.forEach (/f/projects/sms-to-email/index.js:19:21)
at Array.forEach (<anonymous>)
at printMessages (/f/projects/sms-to-email/index.js:17:14)
at main (/f/projects/sms-to-email/index.js:31:5)
at process._tickCallback (internal/process/next_tick.js:68:7)
Num of messages: 0
Num of messages: 1
Flags for 7: \Seen
I was expecting mail that I'm trying to change to toggle being read/unread in the UI by font from bold normal and vice-versa but nothing happens.
The text was updated successfully, but these errors were encountered:
I'm trying to change \Seen flag in an email message but I'm unable to no matter how hard I try ...
I'm using gmail account for testing.
Output:
I was expecting mail that I'm trying to change to toggle being read/unread in the UI by font from bold normal and vice-versa but nothing happens.
The text was updated successfully, but these errors were encountered: