This is not for CGI however, the problem is simple.
EOF must be at the beginning of the line, no white space in front of it

  o _
 /|/ |           Jerrad Pierce             \ | __|_ _|
 /||/           http://pthbb.org          .  | _|   |
 \||          _.-~-._.-~-._.-~-._@"      _|\_|___|___|


> -----Original Message-----
> From: amy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 12, 2000 15:55
> To: [EMAIL PROTECTED]
> Subject: sendMail in cgi program
> 
> 
> if I run the same procedure on a separate file,
> email works, once I put the proc in the cgi
> file, I got the following error.
> 
> in error_log :
> Can't find string terminator "EOF" anywhere before EOF at
> /usr/local/bin/apache/cgi-bin/lib.pl line 484.
> 
> sub sendEmail {
> 
>         open (Sendmail, "|/usr/lib/sendmail -oi -t ")
>                 or die "Can't fork for sendmail: $!\n";
> 
> 484  print Sendmail <<"EOF";
>         From: Bugs <amy\@longsys.com>
>         To: amy <amy\@longsys.com>
>         Subject: Test Create
> 
>         test create
> 
>         EOF
>         close(Sendmail);
> 
> }
> 
> Please help.  Thank You.
> 

Reply via email to