OEMike has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl strict my $sendmail = "/usr/sbin/sendmail -t"; my $from = "From: Foo@Bar.com\n"; my $subject = "Subject: Request to share information\n"; my $content = "Hello..."; my $to = "To: user\@ameritech.net\n\n"; my $recipient = "schafferm\@ameritech.net\n\n"; open(SENDMAIL, "|$sendmail $recipient") or die "Cannot open $sendmail: $!"; print SENDMAIL $subject; print SENDMAIL $from; print SENDMAIL $to; print SENDMAIL $content; close(SENDMAIL);
I then call this from HTML - via a java scripted button w/ /cgi-bin/sendanon.cgi
sendanon.cgi has been set wide open for the time being with chmod 777.
the script executes and yields the following error:
[Mon Jul 15 08:16:26 2002] [error] (2)No such file or directory: exec of /CompleteAct/domains/organexchange.org/http-lib/cgi +- bin/sendanon.cgi failed
any ideas?
edited: ~Tue Jul 16 21:45:35 2002
by footpad: Removed ^M characters from code and added fromatting tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calling Perl from HTML
by Abigail-II (Bishop) on Jul 15, 2002 at 13:58 UTC | |
|
Re: Calling Perl from HTML
by flocto (Pilgrim) on Jul 15, 2002 at 13:58 UTC | |
by OEMike (Novice) on Jul 15, 2002 at 14:03 UTC | |
|
Re: Calling Perl from HTML
by Aristotle (Chancellor) on Jul 15, 2002 at 16:22 UTC | |
by graq (Curate) on Jul 17, 2002 at 13:14 UTC | |
by OEMike (Novice) on Jul 17, 2002 at 14:33 UTC | |
|
Re: Calling Perl from HTML
by stajich (Chaplain) on Jul 15, 2002 at 14:00 UTC | |
by Abigail-II (Bishop) on Jul 15, 2002 at 14:13 UTC | |
by OEMike (Novice) on Jul 15, 2002 at 15:14 UTC | |
by stajich (Chaplain) on Jul 15, 2002 at 15:19 UTC | |
by OEMike (Novice) on Jul 15, 2002 at 16:47 UTC |