addFlags progress
See original GitHub issueIs there a way to get the progress of addFlags
method? I tried listening on update event but it’s shows nothing.
EDIT: It also doesn’t delete all messages when dealing with large mailbox (229882 messages), is there a solutions for this?
const Imap = require('imap');
const imap = new Imap({
user: 'xxxxxxxx@yahoo.com',
password: 'xxxxxxxxx',
host: 'imap.mail.yahoo.com',
port: 993,
tls: true
});
imap.connect();
imap.on('ready', () => {
console.log('Client ready');
imap.openBox('INBOX', false, (err, box) => {
if (err) error(err);
console.log(`INBOX open (${box.messages.total})`);
imap.seq.addFlags('1:*', 'Deleted', err => {
if (err) error(err);
console.log('Flags added');
imap.expunge('1:*', err => {
if (err) error(err);
console.log('Expunge done');
imap.closeBox(false, err => {
if (err) error(err);
console.log('Box closed');
imap.end();
console.log('The end');
});
})
});
});
});
imap.on('update', (seqno, info) => {
console.log('update ' + seqno);
})
function error(err) {
console.log('Error: ' + err.message);
process.exit(1);
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (9 by maintainers)
Top Results From Across the Web
android - How to display progress screen while restarting app?
I do app restart with the following intent: Intent restartIntent = new Intent(context, MainActivity.class); restartIntent.addFlags(Intent.
Read more >Window | Android Developers
addContentView; addFlags; addOnFrameMetricsAvailableListener; clearFlags; closeAllPanels ... Flag for setting the progress bar's indeterminate mode off.
Read more >BossBar (adventure-api 4.12.0 API) - Kyori
Represents an in-game bossbar which can be shown to the client. A bossbar consists of: name: the title of the bossbar; progress: a...
Read more >BossBar (Spigot-API 1.14-R0.1-SNAPSHOT API)
Method Summary ; Returns all players viewing this boss bar · Returns the progress of the bar between 0.0 and 1.0 · Returns...
Read more >git-add Documentation - Git
The git status command can be used to obtain a summary of which files have changes that are staged for the next commit....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For flag modifications, currently we enforce a silent option that prevents flag updates from the server. Initially this decision was made because of how the server sends these flag updates (it sends them as FETCH responses), which made things complicated. I’m not sure if that is the case with the codebase nowadays though.
For checking for a non-empty mailbox, there are a variety of different methods to choose from, including:
mailbox.total
(mailbox
being the object passed toopenBox()
callbacks), it should update as needed, but I’m not sure offhand about after an expunge.status()
on an unopened mailbox, the callback is given a similar mailbox object as withopenBox()
imap.seq.fetch('1')
imap.esearch(['ALL'], ['COUNT'], (err, info) => {})
imap.getQuotaRoot()
and thenimap.getQuota()
to get usage information for a mailboxYou can just do a simple
.search()
for messages with the deleted flag set: