From 4c589f14f5b088bd27818d2c7046995dfa3e5ef8 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Mon, 27 Jun 2016 12:01:19 +0100 Subject: [PATCH] Allow Email node to select folder other than INBOX Closes #215 Thanks to @aamol for spotting --- social/email/61-email.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/social/email/61-email.js b/social/email/61-email.js index 81818356..12738bc2 100644 --- a/social/email/61-email.js +++ b/social/email/61-email.js @@ -318,7 +318,7 @@ module.exports = function(RED) { node.status({fill:"blue", shape:"dot", text:"email.status.fetching"}); //console.log("> ready"); // Open the inbox folder - imap.openBox('INBOX', // Mailbox name + imap.openBox(node.box, // Mailbox name false, // Open readonly? function(err, box) { //console.log("> Inbox open: %j", box); @@ -412,7 +412,7 @@ module.exports = function(RED) { connTimeout: node.repeat, authTimeout: node.repeat }); - imap.on('error', function(err) { + imap.on('error', function(err) { if (err.errno !== "ECONNRESET") { node.log(err); node.status({fill:"red",shape:"ring",text:"email.status.connecterror"});