MIME::Lite is a fine (and more reliable) option, but seeing we are just shelling out to scp why not just invoke sendmail directly by opening a pipe and sending it the required data:
my $sendmail = "/usr/sbin/sendmail -t"; open MAIL, "|$sendmail" or die "Cannot open $sendmail: $!"; print MAIL <<EMAIL; Reply-to: $reply_to Subject: $subject To: $send_to Content-type: text/plain $content . EMAIL close MAIL;
In reply to Re^2: help with scp error codes
by tachyon-II
in thread help with scp error codes
by wskibum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |