in reply to Sanitising email for posting on website

You forgot to decode the message. It was sent with the quoted-printable encoding.

Add something like:

use MIME::Base64; use MIME::QuotedPrint; ... my $body; if ($mail->header('Content-transfer-encoding') =~ /quoted-print/i) { $body = decode_qp($mail->body); } elsif ($mail->header('Content-transfer-encoding') =~ /base64/i) { $body = decode_base64($mail->body); } else { $body = $mail->body; }
and then use the $body instead of $mail->body.

HTH, Jenda
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
   -- Rick Osborne

Edit by castaway: Closed small tag in signature