in reply to How do I send mail from a script?

Hmm. You're writing to the filehandle MAIL, but you've never opened it. And by your use of Mail::Mailer, you don't want to. If you RTFM, you can basically just lift the SYNOPSIS straight into your script:
$mailer = Mail::Mailer->new; $mailer->open(\%headers); print $mailer $body; $mailer->close;
Adjust as needed.

Makeshifts last the longest.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.