Gill,
I am glad that you were able to solve the problem. It might be reasonable for the sake of performance to have all the stuff in just one file - just have it delimited. You can use the same first two steps to get the file and convert it into the string and thereafter you can ad pub.string:tokenize to break the ‘string’ output from bytesToString into three different pieces of information ie email id, subject, body text. Here’s one of the way to store all three pieces in the same file:
someOne@WmUsers.com#$This is a sample mail#$This is the body text…
Now while using the pub.string:tokenize, give #$ as delimiter and you will get a stringList (valueList) with email-id at 0 pos, subject at 1 and the body at 2. Loop over this valueList and map the required field depending on the iteration of the loop. One thing you will have to be careful about is choosing a delimiter (in the example above I’ve used #$, you can choose a combination that suits your need). Though it shouldn’t happen, yet if you are not sure that the delimiter that you want to use will not appear in the body text or subject line… then I guess you can continue with your current approach.
Rohit
#webmethods-Protocol-and-Transport#Integration-Server-and-ESB#webMethods