# Dynamically changing email subject and body

**URL:** <https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292>\
**Category:** Ignition\
**Created:** [May 4, 2023, 9:28pm UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292 "2023-05-04T21:28:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bharat\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bharat\_Krishnan](https://forum.inductiveautomation.com/u/Bharat_Krishnan)\
**Post date:** [May 4, 2023, 9:28pm UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292/1 "2023-05-04T21:28:07Z")

</div>

Hi,  
Is it possible to dynamically modify the email subject and body so that I can include tag values to it.  
For example I have two tags named "tank\_count" and "cycle\_count" with integer values which I want to include in the email subject like this:  
PULSATION RESULTS: Early Failure \<tank\_count\>\<cycle\_count\>  
event value is not possible for my case.  
can anyone help me with this?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 5, 2023, 1:00am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292/2 "2023-05-05T01:00:12Z")

</div>

It shouldn't be a problem to cast the values to a string and concatenate them in your header and body strings. Where are you scripting this from?

---

<div class="post-metadata">

**Author:** ![Bharat\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bharat\_Krishnan](https://forum.inductiveautomation.com/u/Bharat_Krishnan)\
**Post date:** [May 5, 2023, 1:15am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292/3 "2023-05-05T01:15:02Z")

</div>

inside the notification block, where we can modify email subject and body.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 5, 2023, 2:13am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292/4 "2023-05-05T02:13:05Z")

</div>

> [@Bharat\_Krishnan](#):
>
> inside the notification block

I guess I'm not sure what we're talking about. This isn't a [system.net.sendEmail](https://docs.inductiveautomation.com/display/DOC81/system.net.sendEmail) SMPT script? We're trying to automatically inject live tag values into an email component of some kind?

---

<div class="post-metadata">

**Author:** ![Bharat\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bharat\_Krishnan](https://forum.inductiveautomation.com/u/Bharat_Krishnan)\
**Post date:** [May 7, 2023, 9:31pm UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292/5 "2023-05-07T21:31:20Z")

</div>

I created a alarm notification pipeline in which i would like the email notification to be displayed as follows:  
Sub:

` "PULSATION ALARMS FOR"+{[IGNITION_TAGS]PULSATION/Rig_10/Model_Number}+"TANKS"`

Body:

`"Rig "+[IGNITION_TAGS]PULSATION/Rig_10/Station_Name_ +"Faulted at "+[IGNITION_TAGS]PULSATION/Rig_10/Total_Pulses+ "cycles".`  
Is this possible through notification block or should i create a custom message for each alarm.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 7, 2023, 9:57pm UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292/6 "2023-05-07T21:57:51Z")

</div>

Use the \</\> button to format code in your posts. This will preserve indentation and apply syntax highlighting.  
Use \> when quoting someone else.  
You can fix your post using the 🖉 link below it.

---

<div class="post-metadata">

**Author:** ![Bharat\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bharat\_Krishnan](https://forum.inductiveautomation.com/u/Bharat_Krishnan)\
**Post date:** [May 7, 2023, 10:36pm UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292/7 "2023-05-07T22:36:29Z")

</div>

Isn't this method used for html formatting ?  
if I want to display a tag value along with the message should I use "\>"  
what did u mean by the last sentence?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 7, 2023, 10:50pm UTC](https://forum.inductiveautomation.com/t/dynamically-changing-email-subject-and-body/73292/8 "2023-05-07T22:50:22Z")

</div>

> [@Bharat\_Krishnan](#):
>
> Isn't this method used for html formatting?

This forum uses [Markdown](https://www.markdownguide.org/) to format posts. This is converted to HTML when the post is rendered.

> if I want to display a tag value along with the message should I use "\>"?

No. Only use the`>` quotation Markdown when you are quoting someone else's words (as I have quoted you above).

> what did u mean by the last sentence?

Sorry, you should have seen the pencil icon there. There's one under your post so you can edit it.
