Send email with some recipients in one textfield

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.

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

Hi flavien,

Split the string into a Python list. Like this:

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,

Hi nmudge,

Your solution is working.

Thank you, :thumb_left: