hey im working with Apache before i finish a site and put it online...
i am trying to open a pipe and send an email....
the code is v.basic and should work.... however it does. In my error log i get the error:
[error] [client 127.0.0.1] Bad command or file name
delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)}; # stops sendmail path from pointing elsewhere
$mailprog = "|/usr/lib/sendmail -t";
print $query->header;
open(MAIL, "$mailprog")
or die "Can't fork for sendmail: $!\n";
print MAIL "To: $register_email\n";
print MAIL "From: $adminmail\n";
print MAIL "Subject: Temporal - Member Registered\n"; #!!!!!!!!CHANGE!!!!!!!!
print MAIL "\n";
print MAIL "$message";
print MAIL "\n";
close MAIL;
i think this is a problem with my apache because i have used the code before and it used to work. does anyone know what i ca do to fix...assuming there's nothing wrong with my code?
thanks
Pedge
i am trying to open a pipe and send an email....
the code is v.basic and should work.... however it does. In my error log i get the error:
[error] [client 127.0.0.1] Bad command or file name
Code:
delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)}; # stops sendmail path from pointing elsewhere
$mailprog = "|/usr/lib/sendmail -t";
print $query->header;
open(MAIL, "$mailprog")
or die "Can't fork for sendmail: $!\n";
print MAIL "To: $register_email\n";
print MAIL "From: $adminmail\n";
print MAIL "Subject: Temporal - Member Registered\n"; #!!!!!!!!CHANGE!!!!!!!!
print MAIL "\n";
print MAIL "$message";
print MAIL "\n";
close MAIL;
i think this is a problem with my apache because i have used the code before and it used to work. does anyone know what i ca do to fix...assuming there's nothing wrong with my code?
thanks
Pedge