1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Fix email read flag scoping issue

to close #265
This commit is contained in:
Dave Conway-Jones 2016-12-21 17:17:35 +00:00
parent a0b95fe659
commit fa51c8fb36
3 changed files with 4 additions and 5 deletions

View File

@ -52,7 +52,6 @@ to do so automatically.
Please ensure you follow the coding standards used through-out the existing
code base. Some basic rules include:
- all files must have the Apache license in the header.
- indent with 4-spaces, no tabs. No arguments.
- opening brace on same line as `if`/`for`/`function` and so on, closing brace
on its own line.

View File

@ -319,7 +319,7 @@ module.exports = function(RED) {
}
var marks = false;
if (this.disposition === "Read") { marks = true; }
if (node.disposition === "Read") { marks = true; }
// We have the search results that contain the list of unseen messages and can now fetch those messages.
var fetch = imap.fetch(results, {
bodies: '',
@ -351,8 +351,8 @@ module.exports = function(RED) {
// When we have fetched all the messages, we don't need the imap connection any more.
fetch.on('end', function() {
node.status({});
var cleanup = function() {
node.status({});
imap.end();
};
if (this.disposition === "Delete") {
@ -370,8 +370,8 @@ module.exports = function(RED) {
}); // End of imap->search
}); // End of imap->openInbox
}); // End of imap->ready
imap.connect();
node.status({fill:"grey",shape:"dot",text:"node-red:common.status.connecting"});
imap.connect();
} // End of checkIMAP

View File

@ -1,6 +1,6 @@
{
"name": "node-red-node-email",
"version": "0.1.14",
"version": "0.1.15",
"description": "Node-RED nodes to send and receive simple emails",
"dependencies": {
"nodemailer": "^1.11.0",