Sending email to specific addresses by attaching specific files from folders

CSM

New Member
I have a scenario where I have three complex excel files. Each file has thirty to forty worksheets. Each worksheet in excel has to be saved with it's business center number as file name, in a created folder after some data manipulation. For example. file A has 1,2,3,4,centers, and hence 4files. Similarly File B has 1,2,3,4 centers and hence we get four files. For the excel C, we get four files.

The task is, the files associated to center 1 should be emailed to that center1 contact, files associated to center 2 should be emailed to centern2 contact.

How should I develop the logic to attach these specific files to these specific addresses retrieving them from specific folders. I created a spreadsheet for the business center numbers and their corresponding contact emails ids. I need logic to attach these saved files to the emails based on the business center.

I wrote the spreadsheet to a collection. My idea is to add the file names in each folder into the same collection and use a loop to send emails based on the business center number.

Please give me idea/process flow to achieve this task.
 
Top