# The below script is not taking the template while sending out the email its just sending out the subject

**URL:** <https://forum.inductiveautomation.com/t/the-below-script-is-not-taking-the-template-while-sending-out-the-email-its-just-sending-out-the-subject/73336>\
**Category:** Ignition\
**Created:** [May 5, 2023, 5:41pm UTC](https://forum.inductiveautomation.com/t/the-below-script-is-not-taking-the-template-while-sending-out-the-email-its-just-sending-out-the-subject/73336 "2023-05-05T17:41:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashish\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Ashish\_Soni](https://forum.inductiveautomation.com/u/Ashish_Soni)\
**Post date:** [May 5, 2023, 5:41pm UTC](https://forum.inductiveautomation.com/t/the-below-script-is-not-taking-the-template-while-sending-out-the-email-its-just-sending-out-the-subject/73336/1 "2023-05-05T17:41:31Z")

</div>

Subject = event.source.parent.getComponent('Container').getComponent('Text Field 7').text  
Template = event.source.parent.getComponent('Container').getComponent('Text Area').text  
Email = event.source.parent.getComponent('Container').getComponent('Text Field 3').text.split(",")  
system.net.sendEmail(smtpProfile = "xxxx", fromAddr="xxxx", subject=Subject, Template=Template, html=1, to=Email)  
print "Email Sent Successfully."

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 5, 2023, 5:45pm UTC](https://forum.inductiveautomation.com/t/the-below-script-is-not-taking-the-template-while-sending-out-the-email-its-just-sending-out-the-subject/73336/2 "2023-05-05T17:45:52Z")

</div>

What gave you the impression system.net.sendEmail accepts a 'template' keyword argument?  
[https://docs.inductiveautomation.com/display/DOC81/system.net.sendEmail](https://docs.inductiveautomation.com/display/DOC81/system.net.sendEmail)

---

<div class="post-metadata">

**Author:** ![Ashish\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Ashish\_Soni](https://forum.inductiveautomation.com/u/Ashish_Soni)\
**Post date:** [May 5, 2023, 6:17pm UTC](https://forum.inductiveautomation.com/t/the-below-script-is-not-taking-the-template-while-sending-out-the-email-its-just-sending-out-the-subject/73336/3 "2023-05-05T18:17:57Z")

</div>

Still it's not sending the body only the subject

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 5, 2023, 6:18pm UTC](https://forum.inductiveautomation.com/t/the-below-script-is-not-taking-the-template-while-sending-out-the-email-its-just-sending-out-the-subject/73336/4 "2023-05-05T18:18:54Z")

</div>

You're not providing a body.

---

<div class="post-metadata">

**Author:** ![Ashish\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Ashish\_Soni](https://forum.inductiveautomation.com/u/Ashish_Soni)\
**Post date:** [May 5, 2023, 6:20pm UTC](https://forum.inductiveautomation.com/t/the-below-script-is-not-taking-the-template-while-sending-out-the-email-its-just-sending-out-the-subject/73336/5 "2023-05-05T18:20:28Z")

</div>

I mean the template that I have in my script.  
It needs to fetch the data in the text area and send it out via email.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 5, 2023, 6:21pm UTC](https://forum.inductiveautomation.com/t/the-below-script-is-not-taking-the-template-while-sending-out-the-email-its-just-sending-out-the-subject/73336/6 "2023-05-05T18:21:20Z")

</div>

Paul linked you to the docs. 'Template' isn't the name of the body argument, 'body' is.
