my $CR = "\r\n"; ## This should be what your sendmail accepts. ## sendmail will use the correct $CR for the recipient(s) open ( MAIL, ">", $out_email )|| die " Not open $out_email $!\n"; ## Mail Header print MAIL "To: $to$CR"; print MAIL "From: $from$CR"; print MAIL "Subject: $subject$CR"; print MAIL "MIME-Version: 1.0$CR"; print MAIL "Content-Type: text/html; charset=utf-8;$CR"; print MAIL "$CR"; ## "end of headers" ## Mail Body print MAIL "