Yeah, it's very straight forward. Create a string with each value separated by a comma. If it is a text string, then surround it with double quotes. Write the string to a file (if you have multiple rows, just add a new line for each one). Then send the email with the file.