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.
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.