add to email msg.status

and bump nodemailer version
This commit is contained in:
Dave Conway-Jones 2019-04-10 09:01:08 +01:00
parent 0b11d68c02
commit 6dd15d3335
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 6 additions and 6 deletions

View File

@ -116,10 +116,10 @@ module.exports = function(RED) {
smtpTransport.sendMail(sendopts, function(error, info) {
if (error) {
node.error(error,msg);
node.status({fill:"red",shape:"ring",text:"email.status.sendfail"});
node.status({fill:"red",shape:"ring",text:"email.status.sendfail",response:error.response,msg:{to:msg.to,topic:msg.topic,id:msg._msgid}});
} else {
node.log(RED._("email.status.messagesent",{response:info.response}));
node.status({});
node.status({text:"",response:info.response,msg:{to:msg.to,topic:msg.topic,id:msg._msgid}});
}
});
}
@ -357,7 +357,7 @@ module.exports = function(RED) {
//console.log("> search - err=%j, results=%j", err, results);
if (results.length === 0) {
//console.log(" [X] - Nothing to fetch");
node.status({});
node.status({results:0});
imap.end();
s = false;
setInputRepeatTimeout();
@ -397,7 +397,7 @@ 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({});
node.status({results:results.length});
var cleanup = function() {
imap.end();
s = false;

View File

@ -1,11 +1,11 @@
{
"name": "node-red-node-email",
"version": "1.3.0",
"version": "1.4.0",
"description": "Node-RED nodes to send and receive simple emails",
"dependencies": {
"imap": "^0.8.19",
"mailparser-mit": "^1.0.0",
"nodemailer": "^4.7.0",
"nodemailer": "^5.1.1",
"poplib": "^0.1.7"
},
"repository": {