# Node Red Email Connection Timeout Error

**URL:** <https://discourse.nodered.org/t/node-red-email-connection-timeout-error/14029>\
**Category:** General\
**Created:** [5 August 2019 18:47 UTC](https://discourse.nodered.org/t/node-red-email-connection-timeout-error/14029 "2019-08-05T18:47:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rusty](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Rusty](https://discourse.nodered.org/u/Rusty)\
**Post date:** [5 August 2019 18:47 UTC](https://discourse.nodered.org/t/node-red-email-connection-timeout-error/14029/1 "2019-08-05T18:47:01Z")

</div>

Hello,

I've been unable to send any email with Node Red despite many tries and configurations. I consistently get the following message:

msg : error

"Error: Connection timeout"

8/5/2019, 1:54:37 PM[node: fb4c2fd0.94dfc](http://10.x.x.x:1880/#)test subject : msg.error : Object

object

message: "Error: Connection timeout"

source: object

id: "b757ccd6.a1edb"

type: "e-mail"

name: "--------@-----.com"

count: 1

stack: string

Error: Connection timeout at SMTPConnection.\_formatError (/usr/lib/node\_modules/node-red/node\_modules/node-red-node-email/node\_modules/nodemailer/node\_modules/nodemailer-smtp-transport/node\_modules/smtp-connection/src/smtp-connection.js:384:15) at SMTPConnection.\_onError (/usr/lib/node\_modules/node-red/node\_modules/node-red-node-email/node\_modules/nodemailer/node\_modules/nodemailer-smtp-transport/node\_modules/smtp-connection/src/smtp-connection.js:374:29) at SMTPConnection. (/usr/lib/node\_modules/node-red/node\_modules/node-red-node-email/node\_modules/nodemailer/node\_modules/nodemailer-smtp-transport/node\_modules/smtp-connection/src/smtp-connection.js:163:14) at ontimeout (timers.js:386:11) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)

Any ideas would be helpful. I've tried using a Gmail account with 1 step security, enabled less secure apps, tried 2 step security, also with app password. I've also tried using a Yahoo mail account. All tries yield the same result, the above error message. I'm using an inject node and have a string payload of "test" and a topic of "test subject".

I'm running Node Red on a Siemens Simatic IOT with two separate ethernet ports, one connected to the internet via DHCP, the other connected to a separate internal network with a static IP. I wonder if I need to somehow tell the device which port to use. I am however also publishing data to Google Docs with the same flow, that works without issues.

Thanks

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [5 August 2019 19:07 UTC](https://discourse.nodered.org/t/node-red-email-connection-timeout-error/14029/2 "2019-08-05T19:07:39Z")

</div>

Bit of a standard question to start with, but are you behind a proxy? And if so, does that proxy allow traffic through on the SMTP ports for your email host, port 465 for gmail iirc (but that’s from mind so you better look it up). Same for firewalls, does your firewall allow outgoing traffic to those ports?

---

<div class="post-metadata">

**Author:** ![Rusty](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Rusty](https://discourse.nodered.org/u/Rusty)\
**Post date:** [5 August 2019 21:06 UTC](https://discourse.nodered.org/t/node-red-email-connection-timeout-error/14029/3 "2019-08-05T21:06:31Z")

</div>

Good question, I'll find out and get back to you soon.

---

<div class="post-metadata">

**Author:** ![Earl](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@Earl](https://discourse.nodered.org/u/Earl)\
**Post date:** [18 July 2020 05:25 UTC](https://discourse.nodered.org/t/node-red-email-connection-timeout-error/14029/4 "2020-07-18T05:25:20Z")

</div>

I also use the [node-red-node-email](https://flows.nodered.org/node/node-red-node-email) with gmail. It was working fine for almost 2 months then it suddenly stopped sending emails for me and node red starts sending me that("Error: Connection timeout") error.
