my $msg = <<"ENDMSG"; To: $email From: $from Bcc: support\@mysite.com MIME-Version: 1.0 Content-Type: text/html; charset=us-ascii Subject: $subject $theMessage ENDMSG # continue here and print $msg to sendmail