You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by amy <am...@longsys.com> on 2000/06/12 21:55:09 UTC

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 <am...@longsys.com>
        To: amy <am...@longsys.com>
        Subject: Test Create

        test create

        EOF
        close(Sendmail);

}

Please help.  Thank You.