# Email problem

**URL:** <https://forum.inductiveautomation.com/t/email-problem/7331>\
**Category:** Ignition\
**Created:** [September 26, 2013, 6:48pm UTC](https://forum.inductiveautomation.com/t/email-problem/7331 "2013-09-26T18:48:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cja7928](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cja7928](https://forum.inductiveautomation.com/u/cja7928)\
**Post date:** [September 26, 2013, 6:48pm UTC](https://forum.inductiveautomation.com/t/email-problem/7331/1 "2013-09-26T18:48:08Z")

</div>

I would like to send an email to a group of recipients defined by a tag, my tag is a string such as this:  
"person1@mail.com", "person2@mail.com"

when I send the email I get invalid address error.

for recipients I use something like this:

recipients = system.tag.getTagValue(‘SSB/Inv/Email\_Recipients/Email\_Recipient\_ListDaily’)

and what gets returned is: "person1@mail.com", "person2@mail.com"

but it needs to be in square brackets so I tried this:

recipients = [system.tag.getTagValue(‘SSB/Inv/Email\_Recipients/Email\_Recipient\_ListDaily’)]

and Ive also tried:

recipients = [recipients]

the problem is what gets returned is : [u’“person1@mail.com”, "person2@mail.com"’]  
and then the email fails with a bad address.

any ideas how to create a recipients list from a string value?

thanks

---

<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:** [September 26, 2013, 6:57pm UTC](https://forum.inductiveautomation.com/t/email-problem/7331/2 "2013-09-26T18:57:09Z")

</div>

Try splitting the string value you read from the tag on a comma:

```auto
recipients = system.tag.getTagValue('SSB/Inv/Email_Recipients/Email_Recipient_ListDaily')
recipients = recipients.split(',')
```

---

<div class="post-metadata">

**Author:** ![cja7928](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cja7928](https://forum.inductiveautomation.com/u/cja7928)\
**Post date:** [September 26, 2013, 7:07pm UTC](https://forum.inductiveautomation.com/t/email-problem/7331/3 "2013-09-26T19:07:48Z")

</div>

someone here in the office suggested using eval which to my surprise worked:

recipients = eval("["+system.tag.getTagValue(‘SSB/Inv/Email\_Recipients/Email\_Recipient\_ListDaily’)+"]")
