Node-red-node-email

380 views
Skip to first unread message

Rob Br

unread,
Apr 20, 2018, 1:53:22 PM4/20/18
to Node-RED
Since a while I'm facing issues with the email output node. It has worked before using Gmail as well as Zoho (SMTP).
Gmail is configured to accept less secure apps and I can for example read the contents of the Inbox folder using the email input node.
It is the output node that is having issues with timeouts.

Some info:

Node v6.14.1
Node-Red v0.18.4
node-red-node-email v0.1.29 (deleted the global old node modules which were version .25)

The console will just show the following:

20 Apr 19:50:24 - [error] [e-mail:r***@gmail.com] Error: Connection timeout


I have ufw disabled, but when it's enabled port 465 is open, either way it doesn't work.

Any help highly appreciated!


Andres Miyara

unread,
Apr 26, 2018, 7:29:13 AM4/26/18
to Node-RED
Hi Rob, are you trying to send an e-mail with the e-mail node?

Rob Br

unread,
Apr 27, 2018, 9:59:48 AM4/27/18
to Node-RED
Yes, exactly. Do you have any advice?

Op donderdag 26 april 2018 13:29:13 UTC+2 schreef Andres Miyara:
Message has been deleted

Rob Br

unread,
May 7, 2018, 10:54:38 AM5/7/18
to Node-RED
I just tried to reinstall the node-red-node-email package.

First I've removed everything from /usr/lib/node-modules (-g) and the user node_modules.

Then I ran the following command and got an error on the gyp recompile:

<username>@<host>:~/.node-red$ npm i node-red-node-email --unsafe-perm
npm WARN deprecated nodem...@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailp...@0.6.2: This project is unmaintained
npm WARN deprecated mim...@0.3.1: This project is unmaintained
npm WARN deprecated mailco...@2.1.0: This project is unmaintained
npm WARN deprecated buil...@2.0.0: This project is unmaintained

> z...@2.15.3 install /home/
<username>/.node-red/node_modules/zmq
> node-gyp rebuild

make: Entering directory '/home/
<username>/.node-red/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:17: fatal error: zmq.h: No such file or directory
compilation terminated.
zmq.target.mk:95: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/home/
<username>/.node-red/node_modules/zmq/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.4.0-122-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/
<username>/.node-red/node_modules/zmq
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN node-red...@0.0.1 No repository field.
npm WARN node-red...@0.0.1 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: z...@2.15.3 (node_modules/zmq):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: z...@2.15.3 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ node-red-...@0.1.29
updated 1 package in 5.147s



Andres Miyara

unread,
May 7, 2018, 11:01:26 AM5/7/18
to Node-RED
Rob, i would try to reinstall node-red (i know that this isn't a real solution, but it could work)

Rob Br

unread,
May 7, 2018, 11:17:35 AM5/7/18
to Node-RED
Actually I have quite a few webservices running with Node-Red dependencies so I'm a bit reluctant to reinstall Node-Red altogether.


Op maandag 7 mei 2018 17:01:26 UTC+2 schreef Andres Miyara:

Dave C-J

unread,
May 7, 2018, 11:29:10 AM5/7/18
to node...@googlegroups.com
If you look at the error - it seems to be struggling on the zmq library not the email node - mayeb you removed that by mistake and that needs to be re-installed also ? Also I would do an   npm cache clear  first to flush out any old version that may be around. 

Rob Br

unread,
May 8, 2018, 4:58:11 AM5/8/18
to Node-RED
*PROBLEM SOLVED*

ZMQ is an optional module for another Node. I did run the npm install command in both the /usr/lib/... and local node-red folders. This fixed some broken dependencies

Turns out the real problem was that the ISP updated the way virtual private servers can send traffic over ports 25, 465 and 587.
I had to manually go in the management console to enable these ports again. After that all worked fine again. Glad everything is working again now.

Thanks all for thinking along!

Op maandag 7 mei 2018 17:29:10 UTC+2 schreef Dave C-J:
Reply all
Reply to author
Forward
0 new messages