There is a function called append buffer to user file that appends a buffer to a TXT/CSV/BIN file.
You can read text from data table and copy to a Buffer with the copy tag to buffer function.
This buffer is the one you will append to the user file. The file needs to be TXT.
In the e-mail configuration you will click on attachment an select the file with the text you wish to send and then the option send as body.
Attached is an example.