mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
email don't retry connection while still busy.
This commit is contained in:
parent
53ad00f165
commit
46f3dfc382
@ -348,10 +348,10 @@ module.exports = function(RED) {
|
||||
//console.log("> Inbox err : %j", err);
|
||||
//console.log("> Inbox open: %j", box);
|
||||
if (err) {
|
||||
s = false;
|
||||
node.status({fill:"red", shape:"ring", text:"email.status.foldererror"});
|
||||
node.error(RED._("email.errors.fetchfail", {folder:node.box}),err);
|
||||
imap.end();
|
||||
s = false;
|
||||
setInputRepeatTimeout();
|
||||
return;
|
||||
}
|
||||
@ -412,6 +412,7 @@ module.exports = function(RED) {
|
||||
var cleanup = function() {
|
||||
imap.end();
|
||||
s = false;
|
||||
setInputRepeatTimeout();
|
||||
};
|
||||
if (this.disposition === "Delete") {
|
||||
imap.addFlags(results, "\Deleted", cleanup);
|
||||
@ -420,11 +421,12 @@ module.exports = function(RED) {
|
||||
} else {
|
||||
cleanup();
|
||||
}
|
||||
setInputRepeatTimeout();
|
||||
});
|
||||
|
||||
fetch.once('error', function(err) {
|
||||
console.log('Fetch error: ' + err);
|
||||
imap.end();
|
||||
s = false;
|
||||
setInputRepeatTimeout();
|
||||
});
|
||||
}
|
||||
@ -442,7 +444,7 @@ module.exports = function(RED) {
|
||||
if (node.protocol === "POP3") {
|
||||
checkPOP3(msg);
|
||||
} else if (node.protocol === "IMAP") {
|
||||
if (s === false) { checkIMAP(msg); }
|
||||
if (s === false && ss == false) { checkIMAP(msg); }
|
||||
}
|
||||
} // End of checkEmail
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "node-red-node-email",
|
||||
"version": "1.7.8",
|
||||
"version": "1.7.9",
|
||||
"description": "Node-RED nodes to send and receive simple emails",
|
||||
"dependencies": {
|
||||
"imap": "^0.8.19",
|
||||
"mailparser": "^2.7.7",
|
||||
"nodemailer": "^6.4.6",
|
||||
"mailparser": "^2.8.1",
|
||||
"nodemailer": "^6.4.11",
|
||||
"poplib": "^0.1.7"
|
||||
},
|
||||
"repository": {
|
||||
|
Loading…
Reference in New Issue
Block a user