use Encode; use MIME::Lite; use MIME::Base64; # for email base_64 encode use POSIX qw{strftime}; my %paramhash = ( From => $from, Reply-To => $reply_to, To => $to, Subject => "=?iso-8859-1?B?".encode_base64($subject)."?=", Date => strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time)), Type => "multipart/mixed", Encoding => "Base64", ); my $msg = new MIME::Lite(%paramhash); attach $msg Type => "TEXT/plain", Data => encode("iso-8859-1", $msg_body_text ); attach $msg Type => $contentType, Path => $path, Filename => $filename, Disposition => 'attachment'; $msg->send; # you must check for faillure