# I don't arrive to send an email with node email

**URL:** <https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947>\
**Category:** General\
**Created:** [20 August 2021 08:41 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947 "2021-08-20T08:41:08Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [24 August 2021 17:29 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/21 "2021-08-24T17:29:45Z")

</div>

Do NOT try to run the upgrade script on this device - It will probably make things worse...  
What exact hardware are you running on ?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [24 August 2021 20:30 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/22 "2021-08-24T20:30:02Z")

</div>

Oops! dceejay knows what he's talking about, I'm just a beginner!

I assumed nke9 was using a Raspberry Pi, but in fact it's nyghtrider who's screenshot shows /home/pi/.node-red.

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [25 August 2021 11:51 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/23 "2021-08-25T11:51:35Z")

</div>

The version installed of the email is 0.1.29.

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [25 August 2021 11:52 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/24 "2021-08-25T11:52:02Z")

</div>

No problem thanks for your help !

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [25 August 2021 11:52 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/25 "2021-08-25T11:52:53Z")

</div>

It's a LoRa gateway where a specific linux is installed.

---

<div class="post-metadata">

**Author:** ![nyghtrider](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@nyghtrider](https://discourse.nodered.org/u/nyghtrider)\
**Post date:** [25 August 2021 12:43 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/26 "2021-08-25T12:43:11Z")

</div>

How interesting. I am also battling with an embedded linux/node-red system. The Pi is my test bench. To get the embedded system to accept new nodes I had to upgrade the firmware from the manufacturer. They had released a new firmware with v1.3.5 included and that helped. Maybe that's not an option for you although LoRa gear is still current. If you install a new firmware it should reset the layout and possibly return the access to the Palette Manager. Even installing the same firmware will do this. Can you reset the device? The firmware update for these devices is more than a little tricky so get some help from the manufacturer or their forum.

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [25 August 2021 14:02 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/27 "2021-08-25T14:02:19Z")

</div>

OH ! It's seems to be not easy to use Node-RED on embedded system, thanks for your message. I had reset the device and have the Palette manager back. I have tried send an email but I've always the same error message. May be the gateway block some ports but i'm going to see with the manufacturer if they have solution because I have no more idea to fix this problem.

---

<div class="post-metadata">

**Author:** ![tonylane26](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tonylane26/32/9272_2.png) [@tonylane26](https://discourse.nodered.org/u/tonylane26)\
**Post date:** [25 August 2021 14:16 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/28 "2021-08-25T14:16:01Z")

</div>

I agree that the App Password works better than reducing the security level (Google will keep pestering you about the reduced security). I also have a separate gmail account for my Node-Red device, which only sends e-mails to my main account. I like the separation of human vs. automatic.

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [25 August 2021 14:31 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/29 "2021-08-25T14:31:52Z")

</div>

I've made all what you did ... reducing the security level et create a separate gmail accoun just for this application but anything change.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 August 2021 16:18 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/30 "2021-08-25T16:18:22Z")

</div>

I suspect that the old version of NR and the old version of the email node don't work with the new requirements of Gmail. You could try sending email via a different email provider and se if that would work.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [25 August 2021 17:12 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/31 "2021-08-25T17:12:43Z")

</div>

I have found that Google occasionally turn off the less secure apps flag on gmail accounts resulting in email notifications not being sent.

A better way seems to be:  
Use a gmail account specially created for Node-Red rather than your main gmail account..  
Turn on two factor authentication for the account.  
Create an app password.  
In the email node: Server [smtp.gmail.com](http://smtp.gmail.com), Port 465, Use secure connection, Userid [myraspberrypi@gmail.com](mailto:myraspberrypi@gmail.com), Password the 16 character app password generated above.

Of course if it's a problem with old versions of NR or the email node, it still won't work.

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [26 August 2021 07:06 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/32 "2021-08-26T07:06:46Z")

</div>

I try this methos also and it doesn't work ...  
I've tried to update the node email and i've an error message : module not locally installed

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [26 August 2021 07:08 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/33 "2021-08-26T07:08:02Z")

</div>

May be I will try to update the node email by prompt command

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [26 August 2021 09:25 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/34 "2021-08-26T09:25:37Z")

</div>

I try to update le node email and when i went in the package.json the version is the last but not on node-red software.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 August 2021 11:16 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/35 "2021-08-26T11:16:03Z")

</div>

I’m not quite sure what you are saying. Can you expand your explanation?  
What did you actual do to try and update?

Also, have you searched thru the forum and read the other node-red-node-email threads? You might find something useful in one of them.

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [27 August 2021 10:35 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/36 "2021-08-27T10:35:19Z")

</div>

I'have delete the email node and reinstall it with the npm command.

Yes I've searched in other discussions group but I've found nothing that can help me

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [27 August 2021 12:24 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/37 "2021-08-27T12:24:51Z")

</div>

Can you send mail from Python?  
This script works for me:

```auto
#! /usr/bin/python3
import smtplib

username='account@gmail.com'
password='16CharAppPassword'
sendto='recipient@gmail.com'
replyto=username

subject='Test gmail from python' 
content="Hello, this is a gmail test.\nRegards, Raspberry"

# start talking to the SMTP server for Gmail
s = smtplib.SMTP('smtp.gmail.com', 587)
s.starttls()
s.ehlo()
# now login as gmail user
s.login(username,password)
# the email objects
# compose the email. probably should use the email python module
mailtext='From: '+replyto+'\nTo: '+sendto+'\n'
mailtext=mailtext+'Subject:'+subject+'\n'+content
# send the email
s.sendmail(replyto, sendto, mailtext)
# we're done
rslt=s.quit()
# print the result
print('Sendmail result=' + str(rslt[1]))

```

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [31 August 2021 11:41 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/38 "2021-08-31T11:41:29Z")

</div>

Thanks for your help but when I run the script I have this error message : socket.errir [Errno 101] Network is unreachable

---

<div class="post-metadata">

**Author:** ![nke9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nke9/32/46752_2.png) [@nke9](https://discourse.nodered.org/u/nke9)\
**Post date:** [1 September 2021 08:27 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/39 "2021-09-01T08:27:21Z")

</div>

I have found why I couldn't send an email from Node-RED the firewall of my device was blocking the port 465 for the smtp.  
So in the `/etc/firewall.d/00_default.rules` file I need to add the folowing line before the `COMMIT` of this file :

```auto
# SMTP
-A OUTPUT -p tcp --dport 465 -j ACCEPT
-A INPUT -p tcp --sport 465 -j ACCEPT

```

and after that, restart the firewall with this folowing command : `/etc/init.d/firewall restart`

And now all is working thanks you all 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:** [15 September 2021 08:27 UTC](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947/40 "2021-09-15T08:27:40Z")

</div>

Closed on 15 September 2021 08:27 UTC

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

[Previous page](https://discourse.nodered.org/t/i-dont-arrive-to-send-an-email-with-node-email/49947.md?page=1)
