Several attachments for one specific e-mail adress

Hi everyone,
I have a task to send some specific files to specific customers. Each file has unique name=number+customer name. How to make robot to send those files - first find them in the folder using only customer name (ignoring numbers), every found file containing customer name should be put in attachment, then one e-mail for one customer should be send. How to do that?

1 Like

Hi @oredresser
hope these steps will help you resolve this
–use a assign activity and mention like this
Out_filepatharray = Directory.Getfiles(“yourfolderpath”,“Customername”)
this will give us the file path in a array of string
–use a for each loop and pass the above variable as input and change the type argument as string inthe property panel
–use a send outlook or send exchange mail activities forthis, mentionthe customer name in TO property and inthe attach file mentiont the value as item, as it has the file path of what we want to send

Kindly try this and let know for any queries or clarification
Cheers @oredresser

2 Likes

@oredresser
To get files with a specific customer name you can do Directory.GetFiles(directoryPath, “*customerName*”). This will return an array of Strings with all customerName files. Then, you can use one of the Send Mail Message activities based on what email client you’re using. The mail message activity should have an AttachmentsCollection parameter. There you can give it the name of the string array holding all of you files.

1 Like

@oredresser

Try like this:

Directory.GetFiles(“FolderPath”,“customer name”)

2 Likes

Thank you guys a lot!!! It helped!!!

2 Likes

Thanks!

1 Like

Thank you!!

1 Like

so were we able to accomplish this
still any issues to be discussed
Cheers @oredresser