From b9053cf962eb877b360f8d1ee919687e2a016135 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 22 Dec 2022 11:38:00 +0000 Subject: [PATCH] email - better cleanup of deleted messages ? --- social/email/61-email.js | 4 ++-- social/email/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/social/email/61-email.js b/social/email/61-email.js index fc717d25..b7ef9f77 100644 --- a/social/email/61-email.js +++ b/social/email/61-email.js @@ -469,9 +469,9 @@ module.exports = function(RED) { done(); }; if (node.disposition === "Delete") { - imap.addFlags(results, "\Deleted", cleanup); + imap.addFlags(results, '\\Deleted', imap.expunge(cleanup) ); } else if (node.disposition === "Read") { - imap.addFlags(results, "\Seen", cleanup); + imap.addFlags(results, '\\Seen', cleanup); } else { cleanup(); } diff --git a/social/email/package.json b/social/email/package.json index f3c23428..c00d07b2 100644 --- a/social/email/package.json +++ b/social/email/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-email", - "version": "1.18.2", + "version": "1.18.3", "description": "Node-RED nodes to send and receive simple emails.", "dependencies": { "imap": "^0.8.19",