mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Error reporting
Password missing error only occurs if set to basic authentication. Token missing only occurs if set to XOAuth2.
This commit is contained in:
parent
aea1407745
commit
b433ed55f0
@ -196,9 +196,7 @@ module.exports = function(RED) {
|
|||||||
this.inport = n.port || (globalkeys && globalkeys.port) || "993";
|
this.inport = n.port || (globalkeys && globalkeys.port) || "993";
|
||||||
this.box = n.box || "INBOX";
|
this.box = n.box || "INBOX";
|
||||||
this.useSSL= n.useSSL;
|
this.useSSL= n.useSSL;
|
||||||
this.saslformat = n.saslformat;
|
|
||||||
this.autotls= n.autotls;
|
this.autotls= n.autotls;
|
||||||
this.token = n.token || "oAuth2Response.access_token";
|
|
||||||
this.protocol = n.protocol || "IMAP";
|
this.protocol = n.protocol || "IMAP";
|
||||||
this.disposition = n.disposition || "None"; // "None", "Delete", "Read"
|
this.disposition = n.disposition || "None"; // "None", "Delete", "Read"
|
||||||
this.criteria = n.criteria || "UNSEEN"; // "ALL", "ANSWERED", "FLAGGED", "SEEN", "UNANSWERED", "UNFLAGGED", "UNSEEN"
|
this.criteria = n.criteria || "UNSEEN"; // "ALL", "ANSWERED", "FLAGGED", "SEEN", "UNANSWERED", "UNFLAGGED", "UNSEEN"
|
||||||
@ -216,14 +214,23 @@ module.exports = function(RED) {
|
|||||||
this.error(RED._("email.errors.nouserid"));
|
this.error(RED._("email.errors.nouserid"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.credentials && this.credentials.hasOwnProperty("password")) {
|
if(this.authtype === "BASIC" ) {
|
||||||
this.password = this.credentials.password;
|
if (this.credentials && this.credentials.hasOwnProperty("password")) {
|
||||||
} else {
|
this.password = this.credentials.password;
|
||||||
if (globalkeys) {
|
|
||||||
this.password = globalkeys.pass;
|
|
||||||
flag = true;
|
|
||||||
} else {
|
} else {
|
||||||
this.error(RED._("email.errors.nopassword"));
|
if (globalkeys) {
|
||||||
|
this.password = globalkeys.pass;
|
||||||
|
flag = true;
|
||||||
|
} else {
|
||||||
|
this.error(RED._("email.errors.nopassword"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.saslformat = n.saslformat;
|
||||||
|
if(n.token!=="") {
|
||||||
|
this.token = n.token;
|
||||||
|
} else {
|
||||||
|
this.error(RED._("email.errors.notoken"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
"errors": {
|
"errors": {
|
||||||
"nouserid": "No e-mail userid set",
|
"nouserid": "No e-mail userid set",
|
||||||
"nopassword": "No e-mail password set",
|
"nopassword": "No e-mail password set",
|
||||||
|
"notoken": "No token property set",
|
||||||
"nocredentials": "No Email credentials found. See info panel.",
|
"nocredentials": "No Email credentials found. See info panel.",
|
||||||
"nosmtptransport": "No SMTP transport. See info panel.",
|
"nosmtptransport": "No SMTP transport. See info panel.",
|
||||||
"nopayload": "No payload to send",
|
"nopayload": "No payload to send",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user