in reply to encode_entities for sendmail

You'll have a problem with a "\n.\n" sequence in that email (including extra \r's thrown in for disguise, if I'm not mistaken).

Best instead to avoid calling sendmail from a pipe directly, and using one of the wrapper modules, like Net::SMTP or Mail::Sendmail.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.