# Send email with some recipients in one textfield

**URL:** <https://forum.inductiveautomation.com/t/send-email-with-some-recipients-in-one-textfield/9619>\
**Category:** Ignition\
**Created:** [January 29, 2015, 11:42am UTC](https://forum.inductiveautomation.com/t/send-email-with-some-recipients-in-one-textfield/9619 "2015-01-29T11:42:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![flavien](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flavien](https://forum.inductiveautomation.com/u/flavien)\
**Post date:** [January 29, 2015, 11:42am UTC](https://forum.inductiveautomation.com/t/send-email-with-some-recipients-in-one-textfield/9619/1 "2015-01-29T11:42:53Z")

</div>

Hi everybody,

Do you know how can I send an email to some recipients who are written in one textfield ? For exemple user write : "user1@address.com;user2@address.com;user3@address.com" in a textfield and use the following code.

```auto
emailaddress=event.source.parent.getComponent('Text Field').text
system.net.sendEmail("172.20.2.2","noreply@myaddress.fr",subject,body,0,[emailaddress],[file_Name],[file_Data])
```

Thank you for your help

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [January 29, 2015, 11:49am UTC](https://forum.inductiveautomation.com/t/send-email-with-some-recipients-in-one-textfield/9619/2 "2015-01-29T11:49:20Z")

</div>

Hi flavien,

Split the string into a Python list. Like this:

```auto
emailaddress=event.source.parent.getComponent('Text Field').text
emailaddress = emailaddress.split(";")
system.net.sendEmail("172.20.2.2","noreply@myaddress.fr",subject,body,0,emailaddress,[file_Name],[file_Data])
```

You are welcome.  
Best,

---

<div class="post-metadata">

**Author:** ![flavien](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flavien](https://forum.inductiveautomation.com/u/flavien)\
**Post date:** [February 2, 2015, 3:17pm UTC](https://forum.inductiveautomation.com/t/send-email-with-some-recipients-in-one-textfield/9619/3 "2015-02-02T15:17:05Z")

</div>

Hi nmudge,

Your solution is working.

Thank you, ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")
