When facing similar things, I use the smtp method of Mail::Mailer
(which depends on elements of the Net bundle).
The following example sends an e-mail composed from a terminal window.
Obviously you'd need to configure the variables to your situation.
use Mail::Mailer;
print "\nTo: ";
$dest = <>;
chomp $dest;
print "Subject: ";
$subj = <>;
chomp $subj;
print "\nBody:\n";
$body = <>;
$mailer = Mail::Mailer->new( 'smtp', Server => 'pilot.msu.edu' );
$mailer->open( {
From => 'Mr Grits <moranjon@pilot.msu.edu>',
To => $dest,
Subject => $subj,
} )
or die "mailer->open failed: $!\n";
print $mailer $body;
$mailer->close;