Now it's upon you. No one has provided any simpler way to go with a scripted mailing. Everyone has done on their own.
The alert parameter "%SPLUNK_ARG_8%" which gives you a results.csv.gz can be extracted and manipulated to give you result you want. you can refer sendmail.py file to convert into html or you can take a look at the below. the logic will be the same using any of the language you know
_http://www.ctroms.com/blog/code/python/2011/04/20/csv-to-html-table-with-python/
... View more