Received E-Mail has "undefined" payload


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.

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

are you actually receiving the email?

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!

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.