Not really sure what component is not liking its input.
My first guess is the python mail sender is failing to handle the raw data being passed to it by splunk.
Does this command work with other data?
If you output that data to a csv file, is there anything strange in it?
Is there more about the error, for example an indication of what component is emitting the error, or more about how the error is presented?
Is it possible that those are "smart quotes" somehow?