format table output for emails