mel awaisi wrote:
Hi, this is the whole script:

#!/usr/bin/perl

use strict;
use warnings;

# Open Sendmail
open(MAIL, "|/usr/lib/sendmail -t");

# Write to the sendmail program
print MAIL "To: [EMAIL PROTECTED]";
print MAIL "From: [EMAIL PROTECTED]";
print MAIL "Subject:Yoour Subject\n\n";
print MAIL "Your messsage here";


# Close the sendmail program close(MAIL);


As an aside you shouldn't use sendmail directly to send messages from Perl, while in most cases it will work, it makes your scripts less portable and will lead to more problems, you should use one of the many modules available at CPAN. Mail::Mailer, MIME::Lite, Mail::Message, to name just a few...


Have you checked the path to sendmail? Are you sure the local sendmail server is running? What does the maillog say, it should provide an error or sending information?

http://danconia.org


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to