mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Tiny tidy of email node
really needs a proper re-write…
This commit is contained in:
parent
34199142dd
commit
74d51f5a79
@ -97,7 +97,7 @@
|
||||
return this.dname||this.name||"email";
|
||||
},
|
||||
labelStyle: function() {
|
||||
return (this.dname||!this.topic)?"node_label_italic":"";
|
||||
return (this.dname)?"node_label_italic":"";
|
||||
},
|
||||
oneditprepare: function() {
|
||||
if (this.credentials.global) {
|
||||
@ -249,7 +249,7 @@
|
||||
return this.name||"email";
|
||||
},
|
||||
labelStyle: function() {
|
||||
return (this.name||!this.topic)?"node_label_italic":"";
|
||||
return (this.name)?"node_label_italic":"";
|
||||
},
|
||||
oneditprepare: function() {
|
||||
if (this.credentials.global) {
|
||||
|
@ -203,6 +203,7 @@ module.exports = function(RED) {
|
||||
function checkPOP3(msg) {
|
||||
var currentMessage;
|
||||
var maxMessage;
|
||||
//node.log("Checking POP3 for new messages");
|
||||
|
||||
// Form a new connection to our email server using POP3.
|
||||
var pop3Client = new POP3Client(
|
||||
@ -237,7 +238,7 @@ module.exports = function(RED) {
|
||||
});
|
||||
|
||||
pop3Client.on("error", function(err) {
|
||||
node.log("We caught an error: " + JSON.stringify(err));
|
||||
node.log("error: " + JSON.stringify(err));
|
||||
});
|
||||
|
||||
pop3Client.on("connect", function() {
|
||||
@ -297,7 +298,7 @@ module.exports = function(RED) {
|
||||
//
|
||||
// Check the email sever using the IMAP protocol for new messages.
|
||||
function checkIMAP(msg) {
|
||||
node.log("Checking IMAP for new messages");
|
||||
//node.log("Checking IMAP for new messages");
|
||||
// We get back a 'ready' event once we have connected to imap
|
||||
imap.once("ready", function() {
|
||||
node.status({fill:"blue", shape:"dot", text:"email.status.fetching"});
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "node-red-node-email",
|
||||
"version": "0.1.24",
|
||||
"version": "0.1.25",
|
||||
"description": "Node-RED nodes to send and receive simple emails",
|
||||
"dependencies": {
|
||||
"nodemailer": "^1.11.0",
|
||||
"poplib": "^0.1.7",
|
||||
"mailparser": "^0.6.1",
|
||||
"mailparser": "^0.6.2",
|
||||
"imap": "^0.8.19"
|
||||
},
|
||||
"repository": {
|
||||
|
Loading…
Reference in New Issue
Block a user