in reply to Mail distorted

I second the previous motion to use MIME::Lite. Just to amplify on that a bit:

I know the attachment will work fine if you base64 encode it, binary attachments want base64 encoding.

MIME::Lite will do all the nitty-gritty work to generate emails. With binary type attachments, it can open the file, base64 encode it, and insert it into the SMTP data as a MIME attachment in a single statement.