# Received E-Mail has "undefined" payload

**URL:** <https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658>\
**Category:** General\
**Created:** [27 June 2019 12:05 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658 "2019-06-27T12:05:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![S.M](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@S.M](https://discourse.nodered.org/u/S.M)\
**Post date:** [27 June 2019 12:05 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658/1 "2019-06-27T12:05:23Z")

</div>

Hello!

I am trying to send an email with the current temperature measured by an Aqara temperature and humidity sensor.  
I do receive the email with the set topic, however, the payload in the email says "undefined". I have attached screenshots of the current flow. There were several more I have tried out but nothing seemed to work.

 ![flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d5b408c24b23ffa02ac0e00769c607247e9c61d0.jpeg)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [27 June 2019 12:34 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658/2 "2019-06-27T12:34:09Z")

</div>

Put a debug node after your function and before your Email node and check what it sees.

---

<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:** [27 June 2019 13:20 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658/3 "2019-06-27T13:20:05Z")

</div>

are you actually receiving the email?

---

<div class="post-metadata">

**Author:** ![S.M](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@S.M](https://discourse.nodered.org/u/S.M)\
**Post date:** [27 June 2019 13:23 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658/4 "2019-06-27T13:23:29Z")

</div>

I did receive the email, it's just that it contained nothing but the text "undefinded".

However, I just figured it out. Apparently I had to write the message text into body, not into payload. I did something like 'body : "Temperature: " + msg.payload + "°C"' and it works fine now!

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [27 June 2019 13:35 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658/5 "2019-06-27T13:35:03Z")

</div>

That isn't what the node's documentations says. So it would be good if you can confirm the message you are sending to the email node and the version of the Email node you are using.

---

<div class="post-metadata">

**Author:** ![qimo](https://avatars.discourse-cdn.com/v4/letter/q/a183cd/32.png) [@qimo](https://discourse.nodered.org/u/qimo)\
**Post date:** [10 September 2021 18:20 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658/6 "2021-09-10T18:20:35Z")

</div>

Hello @S.M

I am experiencing the same problem. Could you please share exactly the format of the payload you sent via email?

Thank you.

---

<div class="post-metadata">

**Author:** ![qimo](https://avatars.discourse-cdn.com/v4/letter/q/a183cd/32.png) [@qimo](https://discourse.nodered.org/u/qimo)\
**Post date:** [10 September 2021 19:05 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658/7 "2021-09-10T19:05:06Z")

</div>

@S.M

My problem is solved. I figured out that i was using "node-red-contrib-email-out" instead of using "node-red-node-email"

---

<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:** [24 September 2021 19:05 UTC](https://discourse.nodered.org/t/received-e-mail-has-undefined-payload/12658/8 "2021-09-24T19:05:44Z")

</div>

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