Ugh... mamy moons ago I had a Linux system generate a nightly report. A script (probably PERL) queried a MySQL database and sent the results to our customer by piping the output to Sendmail as a .csv.
Worked great for a year or so, then we were bought out by another company. Our new IT overlords moved our email to Exchange, which decided that my plain text emails were boring, and mangled them (I think it actually tried to wrap some HTML) which broke the customer's input process.
IT said it's my problem, because the resulting email was "valid SMTP".