# Using node-red-node-email with local mail server

**URL:** <https://discourse.nodered.org/t/using-node-red-node-email-with-local-mail-server/21927>\
**Category:** General\
**Created:** [18 February 2020 12:49 UTC](https://discourse.nodered.org/t/using-node-red-node-email-with-local-mail-server/21927 "2020-02-18T12:49:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tukru](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@tukru](https://discourse.nodered.org/u/tukru)\
**Post date:** [18 February 2020 12:49 UTC](https://discourse.nodered.org/t/using-node-red-node-email-with-local-mail-server/21927/1 "2020-02-18T12:49:19Z")

</div>

Hi,  
I want to use node-red-node-email with a local mail server. First I tried with gmail and didn't had any problem but after I tried with the local server and it's returning:  
Unexpected socket close.

What could be the problem? Do I have to do something like aplications less secure from gmail?

Thanks for all

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 February 2020 13:57 UTC](https://discourse.nodered.org/t/using-node-red-node-email-with-local-mail-server/21927/2 "2020-02-18T13:57:37Z")

</div>

Do you know for sure that your local mail server is working correctly?

How have you set up your mail server? What connection methods does it require? Are you using TLS? Is it on the same device as Node-RED? Does it have any security set up? (e.g. machine firewall, failtoban, etc).

When do you get that error? Is Node-RED connecting to the sever but not sending? Have you checked the mail server's logs?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 February 2020 16:25 UTC](https://discourse.nodered.org/t/using-node-red-node-email-with-local-mail-server/21927/3 "2020-02-18T16:25:34Z")

</div>

and do you have latest version of email node - there was a fix that went in a few days ago for a connection issue.

---

<div class="post-metadata">

**Author:** ![tukru](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@tukru](https://discourse.nodered.org/u/tukru)\
**Post date:** [26 February 2020 14:05 UTC](https://discourse.nodered.org/t/using-node-red-node-email-with-local-mail-server/21927/4 "2020-02-26T14:05:12Z")

</div>

First of all sorry for the delay I had to wait until I get most of the info.

@dceejay Yes, I have the last version.

@TotallyInformation Yes, it's working correctly. Yes, I am using TLS, The server is working in another device. I had this error when I sended a mail with the node-red-node-email.

I don't think firewall is a problem right now but I have to take care for the future.

The mail server is an Exchange server. I checked and the connection methods are working (I tried in my Outlook client).

---

<div class="post-metadata">

**Author:** ![unixneo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/unixneo/32/17441_2.png) [@unixneo](https://discourse.nodered.org/u/unixneo)\
**Post date:** [26 February 2020 14:11 UTC](https://discourse.nodered.org/t/using-node-red-node-email-with-local-mail-server/21927/5 "2020-02-26T14:11:01Z")

</div>

You might try logging into your mail server and (assuming it is a Linux or Unix-like server, and you have access to it) look in the mail log for clues.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 April 2020 14:11 UTC](https://discourse.nodered.org/t/using-node-red-node-email-with-local-mail-server/21927/6 "2020-04-26T14:11:06Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
