Author: p cooper Date: To: exim-users Subject: Re: [exim] exim called in perl scripts
sorry to be so slow - Im an 'interested amateur' in this
when I add perl module
use Mail::Sendmail;
I can send mail from the script ( either as root and chowned root:root or
chowned me:user and su'd me) and its handled by exim . Dont usderstand why
though
using the exim/sendmail pipe ( run as user ;-) )
my $sendmail = "/usr/sbin/exim -bm -t -i";
user =me
but the sendmail lines need a "\n" at the end of each line
ie
{
open(SENDMAIL, "|$sendmail") or die "Cannot open mailer: $!";
print SENDMAIL "$subject\n";
print SENDMAIL "To :me\@isp\n";
#print SENDMAIL "Content-type: text/plain\n\n";
print SENDMAIL $text;
close(SENDMAIL);
}
and it works . Not sure why I seem to be different to other setups ive googled
( probably a perl setup question)