Adam Jimerson wrote:
I solved my problem using the sendmail with the code below in my script:

open (MAIL, "|/usr/sbin/sendmail -t ");
print MAIL "From: someaddr...@somedomain\n";
print MAIL "To: someaddre...@somedomain\n";
print MAIL "Content-Type: text/plain\n";
print MAIL "Subject: Very simple email test\n\n";
print MAIL "Body of the message";
close (MAIL);

This is kind of off topic, but are you using the -T switch on your script? When I tried to open "/usr/bin/mail" with that switch on I get a error message about an insecure environment command.

Did it just say "insecure environment"? On my box it says: "Insecure $ENV{PATH} ...", which means that you need to untaint the $ENV{PATH} variable. The easiest way to do that is:

    $ENV{PATH} = '';

Please read more about Perl security in "perldoc perlsec".

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
For additional commands, e-mail: beginners-cgi-h...@perl.org
http://learn.perl.org/


Reply via email to