# Problem adding variable in email body

**URL:** <https://forum.inductiveautomation.com/t/problem-adding-variable-in-email-body/45846>\
**Category:** Ignition\
**Created:** [April 21, 2021, 6:37am UTC](https://forum.inductiveautomation.com/t/problem-adding-variable-in-email-body/45846 "2021-04-21T06:37:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 21, 2021, 8:23am UTC](https://forum.inductiveautomation.com/t/problem-adding-variable-in-email-body/45846/2 "2021-04-21T08:23:01Z")

</div>

```auto
value = newValue.value

if value == 1:
    variable = system.tag.read("[default]TagTest")
    variableQV = variable.value
    body = "TagTestValue: " +str(variableQV)
    

	system.report.executeAndDistribute(path="MyPath", project="MyProject", action= "email", 
	actionSettings = {"to":["myEmail"], "smtpServerName":"EmailSetting", "from":"myCompany", "subject":"MySubject", "body":body})

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/problem-adding-variable-in-email-body/45846)._
