mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Tweaks to email error rmessages
This commit is contained in:
parent
1309b9a72d
commit
df9744084c
@ -21,7 +21,7 @@ var util = require('util');
|
||||
try {
|
||||
var emailkey = RED.settings.email || require(process.env.NODE_RED_HOME+"/../emailkeys.js");
|
||||
} catch (err) {
|
||||
util.log("[61-imap.js] Advise : No Email credentials found.");
|
||||
//util.log("[61-imap.js] Info : No Email credentials found.");
|
||||
}
|
||||
|
||||
if (emailkey) {
|
||||
|
@ -17,7 +17,12 @@
|
||||
var RED = require(process.env.NODE_RED_HOME+"/red/red");
|
||||
var util = require('util');
|
||||
var nodemailer = require("nodemailer");
|
||||
var Imap = require('imap');
|
||||
var Imap = null;
|
||||
try {
|
||||
Imap = require('imap');
|
||||
} catch (e) {
|
||||
util.log("[61-email.js] - imap npm not installed - no inbound email available");
|
||||
}
|
||||
|
||||
//console.log(nodemailer.Transport.transports.SMTP.wellKnownHosts);
|
||||
|
||||
@ -85,7 +90,6 @@ function EmailNode(n) {
|
||||
}
|
||||
RED.nodes.registerType("e-mail",EmailNode);
|
||||
|
||||
|
||||
function EmailInNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.name = n.name;
|
||||
@ -202,7 +206,9 @@ function EmailInNode(n) {
|
||||
|
||||
node.emit("input",{});
|
||||
}
|
||||
if (Imap != null) {
|
||||
RED.nodes.registerType("e-mail in",EmailInNode);
|
||||
}
|
||||
|
||||
var querystring = require('querystring');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user