Is it Correct to Use String Array for Multiple File Attachments for Send Email Activities

I am looking to be able to go through a directory containing files and add each one to an already existing array of strings. Ideally, I will be able to attach this array to a mail activity and send all the files as attachments in one email. Thank you

Instead of adding the extracted array to a existing array variable we can insert them to a list variable because the number of files might differ at any
And change in the element count is not possible with a array
So use a assign activity like this
list_variable = Directory.GetFiles(“yourfolderpath”,”*.fileextension”).ToList()

Where list_variable is a variable of type system.collections.generic.list(of string) with default value as new list(of string) defined in the variable panel

So we can directly use this in ATTACHMENT COLLECTION property in the send mail activity in the property panel
Or we can assign this to another list with a assign activity and then use that in ATTACHMENT COLLECTION property

cheers @jpreziuso

1 Like

Thank you for the suggestion

Cheers
Kindly let know for any queries or clarification
@jpreziuso

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.