# Send html email

**URL:** <https://discourse.nodered.org/t/send-html-email/101857>\
**Category:** General\
**Created:** [5 October 2026 15:17 UTC](https://discourse.nodered.org/t/send-html-email/101857 "2026-10-05T15:17:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![omni-support](https://avatars.discourse-cdn.com/v4/letter/o/eb9ed0/32.png) [@omni-support](https://discourse.nodered.org/u/omni-support)\
**Post date:** [5 October 2026 15:17 UTC](https://discourse.nodered.org/t/send-html-email/101857/1 "2026-10-05T15:17:02Z")

</div>

I am using node-red to read one device via Modbus TCP. this step is working. also I use node-red module to send email and it works as well. however, when I include some data from modbus reading into a html email content, I got some issue.  
I attach template module to display msg.payload from previous node, but I can't get data display.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/7/07d05a3965c293c09d7bb3b2c26d22e65147f9e1.png)

the previous node is shown below

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/a/6ac138b2db65eef9be76919e2e15568f365762b5.png)

When I connect buffer-parser node to debug node, and use msg.payload.vln[0] in debug output , I got reading. but after connect to template node then connect debug node, msg.payload.vln[0] in template node, program can't display value for payload.vln[0]

Does any body know how to fix this issue?

---

<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:** [5 October 2026 15:38 UTC](https://discourse.nodered.org/t/send-html-email/101857/2 "2026-10-05T15:38:03Z")

</div>

Either you are working with msg.payload.vln[0] or with msg.payload.VLN[0].

Which is it?

The template is modifying msg.payload to contain some html, so it's no surprise if a debug afterwards can find neither msg.payload.VLN[0] nor msg.payload.vln[0]

---

<div class="post-metadata">

**Author:** ![omni-support](https://avatars.discourse-cdn.com/v4/letter/o/eb9ed0/32.png) [@omni-support](https://discourse.nodered.org/u/omni-support)\
**Post date:** [5 October 2026 15:53 UTC](https://discourse.nodered.org/t/send-html-email/101857/3 "2026-10-05T15:53:27Z")

</div>

I use msg.payload.VLN[0] in template module. how can I insert msg.payload data into html content?

thanks

---

<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:** [5 October 2026 16:22 UTC](https://discourse.nodered.org/t/send-html-email/101857/4 "2026-10-05T16:22:25Z")

</div>

There is a discussion about this at [https://discourse.nodered.org/t/support-bracket-name-to-specify-array-index-in-mustache/57585/5](https://discourse.nodered.org/t/support-bracket-name-to-specify-array-index-in-mustache/57585/5)

Essentially you cannot use array indices within mustache syntax.

This should work instead

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/f/2fae7c594cbbbff2c8c8684bd6720c3fdb4f1fb9.png)

---

<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:** [6 October 2026 19:20 UTC](https://discourse.nodered.org/t/send-html-email/101857/5 "2026-10-06T19:20:04Z")

</div>

In case anyone else has a similar problem in future, it would be useful for you to confirm (or not) that the suggestion worked.

Common politeness too.
