Sending attachments by email separately (one by one) from one file

I have to send some files by email one by one, unfortunately, it does not work well
in the first email, it attaches one file, in the second first file and the second one, in the third email first two + one more and so on.letterbyemail.xaml (13.3 KB)

Hi,
Try Directory.getFiles(“FolderpathwWhichHasFiles”)
it will give you list
Use for loop of the list
Then use send outlook mail message activity and in attach files give the item of for each,

let me know if this works,

Regards,
Pavan H.

I already tried it but it did not work :confused: or i am not doing correctly if you can see attached file it would be great.

Thanks for your quick response.
David. M

Hi @meshvela

I tried the solution in a different way which is simple according to me, I did not use invoke code to add to list i just tried with getDirectory(“Path”) and assigned to array of objects then inside for each I gave send outlook mail message in the attachment property I gave item.tostring.

Please refer the image for more info and let us know if that helps

Regards,
Pavan H

2 Likes

Hi @pavanh003

It worked perfectly!
thanks for your help.

Best regards
David M

1 Like

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