I have a Textfile with some 20 lines of data.
I need to COPY the entire content/all lines of text file and pass this to the BODY of email.
What Utility/Methods I need to use to acheive this?
You need two parts; one to read the file and one to generate the email.
For part 1:
You can use a Static Method available in the Global Assembly Cache. To locate it, right-click in the Toolbox and select Choose Items. Select the "Pega Robotics Static Members" tab and select the "From Global Assembly Cache" checkbox. Select the MSCORLIB assembly and locate the "File" node and check the "ReadAllText" method underneath it. Now you can drag this into an automation to read the text of a file.
For Part 2:
You'll need to use the Outlook Connector. Once you add it to your Global Container, you can call the NewEmail method. Extract a proxy from the result and locate the Body property of the proxy. You can set this value to be that of the result from ReadAllText. You'll need to call the Display method of the proxy for the message to be visible.