# Node-red-node-email not sending email on double nat network

**URL:** <https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563>\
**Category:** General\
**Created:** [17 August 2022 16:49 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563 "2022-08-17T16:49:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnandJhaveri](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anandjhaveri/32/63008_2.png) [@AnandJhaveri](https://discourse.nodered.org/u/AnandJhaveri)\
**Post date:** [17 August 2022 16:49 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/1 "2022-08-17T16:49:49Z")

</div>

### Which node are you reporting an issue on?

node-red-node-email

### What are the steps to reproduce?

double nat your network  
send an email using the node

### What happens?

I get the following error:  
Error: connect ENETUNREACH 2404:6800:4003:c11::6c:465 - Local (:::0)

### What do you expect to happen?

I expect that the email will be sent to the addressee

It was working before I double nat'ed my network

### Please tell us about your environment:

Node-RED version : 3.0.0  
NodeJS version: 14.19.3  
npm version: 6.14.17  
node-red-node-email version 1.17.0  
OS version: Raspbian 11 (bullseye)  
Browser: Edge

Any help to understand the relation between the error and the network being double 'natted' will greatly help.

Regards,  
Anand.

---

<div class="post-metadata">

**Author:** ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)\
**Post date:** [17 August 2022 17:47 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/2 "2022-08-17T17:47:27Z")

</div>

Double NAT should not prevent the sending of e-mail. Can you ping the email server from the machine running NodeRed?  
The error code I think is related to DNS failure.

Many networks are now double NAT, mostly because IPv4's are running out so service providers are running CG-NAT. Make sure it's not a DNS issue locally on your network, point to point.

---

<div class="post-metadata">

**Author:** ![AnandJhaveri](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anandjhaveri/32/63008_2.png) [@AnandJhaveri](https://discourse.nodered.org/u/AnandJhaveri)\
**Post date:** [17 August 2022 18:17 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/3 "2022-08-17T18:17:13Z")

</div>

Thanks for your suggestions.

I was able to successfully ping the email server from the Rpi running NodeRed.

I was also able to ping the DNS server as well. So, this ruled out issues with DNS etc.

I was told that the problem might be related to my machine using IPv6 addresses instead of iPv4, so I have now disabled IPv6 from the Rpi by adding " ipv6.disable=1" to the file: /boot/cmdline.txt

After doing this, ifconfig stops showing the IPv6 address and the problem seems to have resolved itself for the moment.

I am not sure if this is the right thing to do?

I am very new to both the Rpi and Linux so any suggestions on a better way to address this issue would be very helpful.

---

<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:** [17 August 2022 19:22 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/4 "2022-08-17T19:22:32Z")

</div>

> [@AnandJhaveri](#):
>
> I am not sure if this is the right thing to do?

Yes, it is. Even after all these years many things fail hard over IPv6.

---

<div class="post-metadata">

**Author:** ![AnandJhaveri](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anandjhaveri/32/63008_2.png) [@AnandJhaveri](https://discourse.nodered.org/u/AnandJhaveri)\
**Post date:** [17 August 2022 20:07 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/5 "2022-08-17T20:07:01Z")

</div>

I am now getting a new error

Error: getaddrinfo EAI\_AGAIN [smtp.gmail.com](http://smtp.gmail.com)

This occurs after disabling IP6 as described in my earlier post.

So, it looks like I'm stuck.

If I enable IP6, I am unable to even get to the smtp server.

If I disable IP6, I am now running into the error shown above in this post.

Not sure how to proceed so any help would be greatly appreciated.

Regards,  
Anand.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 August 2022 21:00 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/6 "2022-08-17T21:00:52Z")

</div>

> [@AnandJhaveri](#):
>
> Error: getaddrinfo EAI\_AGAIN [smtp.gmail.com](http://smtp.gmail.com)

Can you still `ping smtp.gmail.com`?

---

<div class="post-metadata">

**Author:** ![AnandJhaveri](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anandjhaveri/32/63008_2.png) [@AnandJhaveri](https://discourse.nodered.org/u/AnandJhaveri)\
**Post date:** [17 August 2022 21:04 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/7 "2022-08-17T21:04:07Z")

</div>

No, I am unable to ping anything.

I get the following error:

ping: socket: Address family not supported by protocol

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 August 2022 21:14 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/8 "2022-08-17T21:14:47Z")

</div>

Does this work  
`ping -4 smtp.gmail.com`  
This problem is nothing to do with node-red of course.

---

<div class="post-metadata">

**Author:** ![AnandJhaveri](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anandjhaveri/32/63008_2.png) [@AnandJhaveri](https://discourse.nodered.org/u/AnandJhaveri)\
**Post date:** [18 August 2022 08:19 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/9 "2022-08-18T08:19:36Z")

</div>

ping -4 [smtp.gmail.com](http://smtp.gmail.com) also doesn't work

I have now re-installed the OS and node-red and all seems to be in order.

Thanks for your help

---

<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:** [17 October 2022 08:19 UTC](https://discourse.nodered.org/t/node-red-node-email-not-sending-email-on-double-nat-network/66563/10 "2022-10-17T08:19:48Z")

</div>

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