Bump email packages, rename users internal variable.

This commit is contained in:
Dave Conway-Jones
2025-08-04 17:12:02 +01:00
parent 5e829109ab
commit 9d57aa1942
2 changed files with 7 additions and 7 deletions

View File

@@ -629,7 +629,7 @@ module.exports = function(RED) {
this.starttls = n.starttls;
this.certFile = n.certFile;
this.keyFile = n.keyFile;
this.users = n.users;
this.mtausers = n.users;
this.auth = n.auth;
try {
this.options = JSON.parse(n.expert);
@@ -687,10 +687,10 @@ module.exports = function(RED) {
}
node.options.onAuth = function (auth, session, callback) {
let id = node.users.findIndex(function (item) {
let id = node.mtausers.findIndex(function (item) {
return item.name === auth.username;
});
if (id >= 0 && node.users[id].password === auth.password) {
if (id >= 0 && node.mtausers[id].password === auth.password) {
callback(null, { user: id + 1 });
} else {
callback(new Error("Invalid username or password"));

View File

@@ -1,13 +1,13 @@
{
"name": "node-red-node-email",
"version": "3.0.4",
"version": "3.1.0",
"description": "Node-RED nodes to send and receive simple emails.",
"dependencies": {
"imap": "^0.8.19",
"node-pop3": "^0.9.1",
"mailparser": "^3.7.2",
"nodemailer": "^6.10.1",
"smtp-server": "^3.13.6"
"mailparser": "^3.7.4",
"nodemailer": "^7.0.5",
"smtp-server": "^3.14.0"
},
"bundledDependencies": [
"imap",