Hi,
I don't think I'm perfectly clear on what you're asking, so if I have this wrong, say so and i'll delete.
You currently have a bunch of files in a folder. Your script scans the folder and for each file writes the contents to the data source you are dynamically building.
What you want is not to read lots of files. Instead, you want to read one file. And for each email within the file, create a new row in the data source you are dynamically building.
I suppose this depends on how the source file looks.
In the source file, is each email on one separate line? If so, don't even bother transforming, just use that file as your datasource.
In the source file, can one email spread over multiple lines? If so, then you need some way to clearly identify the start of each email, a bit like <CRLF> in a text file. If you can spot some single magic character that delmits each email in the file, then again, don't bother transforming.
If the method to split emails consists for several chars, e.g. "<email><recpients>", then it's possible. I would read the file into into a single string and use indexOf to find the start and add each 'chunk' as a row in the datasource.