Hi everybody, I'm having trouble with setting the path to my sendmail program when using the -T switch. It's a simple script that creates a from, asks for an email adresse and sends an answer after the form was submitted. I keep getting the following error message although I've set the $ENV{'PATH'} in the script. Can anyone help?
Error message: Insecure directory in $ENV{PATH} while running with -T switch at /usr/local/httpd/cgi-bin/subscribe.pl line 45. Here is a part of the code ________snippet______ #!/usr/bin/perl -wT #Pull in modules, create form etc. sub send_mail { my $a = shift; $a = check($a); #sub that check's the email adress print ("Thank your for ordering our Newsletter."); $ENV{'PATH'} = "|/usr/sbin/sendmail -oi -t -odq"; open(SENDMAIL, "$ENV{'PATH'}") or die "Can't fork for sendmail: $!\n"; print SENDMAIL <<"FILE"; From: JUVE Newsline <[EMAIL PROTECTED]> To: <$a> . .etc } _____Snippet______ Thanks Marcus Marcus Willemsen Online Redaktion Juve Verlag GmbH Sachsenring. 6 50677 Köln ++49 (0)221 91 38 80 16 www.juve.de Geschäftsführer: Dr. Astrid Gerber, Dr. Aled W. Griffiths Sitz der Gesellschaft: Köln Amtsgericht Köln HRB 29593, Gerichtsstand: Köln Bankverbindung: Stadtsparkasse Köln, BLZ 37050198, Kto-Nr. 4772281 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>