Valkerri has asked for the wisdom of the Perl Monks concerning the following question:
Thank you in advance for your help. This site has been a godsend.
Ever had an ISP not return your calls? Well I have stripped down this script to its barest bones trying to get it to work on a box that I can get no information about and to which I am allowed FTP access only. The script runs so permissions are OK, right? But the following code dies at line 20 so it specifically has a problem with some aspect of Sendmail? This script ran on another box just fine.
So, what could I try assuming I will never get an answer from the ISP? Time is running out on this project.
#!/usr/bin/perl -w use strict; use CGI qw(:standard); my $request = new CGI; my $emailaddress = "me\@mydomain.com"; my $emailaddress2 = "client\@clientdomain.com"; my $htmlpagegood = '<html><head><title>TITLE</TITLE></head><body><P>HI +</body></html>'; my $htmlpagebad = '<html><head><title>TITLE</TITLE></head><body><P>BYE +</body></html>'; open(MAIL, "|/usr/lib/sendmail -t") or die "Content-type: text/html\n\ +n\n$htmlpagebad"; print MAIL "To: $emailaddress\n"; print MAIL "From: $emailaddress2\n"; print MAIL "Subject: subjectmatter\n"; print MAIL "Content-type: text/plain\n\n"; print MAIL "bodytext\n\n"; close(MAIL) or die "Content-type: text/html\n\n\n$htmlpagebad"; print "Content-type: text/html\n\n\n$htmlpagegood"; exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sendmail in a Blackbox
by Trimbach (Curate) on Aug 05, 2001 at 09:13 UTC | |
|
Re: Sendmail in a Blackbox
by mitd (Curate) on Aug 05, 2001 at 10:07 UTC | |
|
Re: Sendmail in a Blackbox
by rob_au (Abbot) on Aug 05, 2001 at 11:59 UTC | |
|
Re: Sendmail in a Blackbox
by toma (Vicar) on Aug 05, 2001 at 10:13 UTC | |
|
Re: Sendmail in a Blackbox
by strredwolf (Chaplain) on Aug 05, 2001 at 10:00 UTC | |
|
Re: Sendmail in a Blackbox
by tachyon (Chancellor) on Aug 05, 2001 at 19:28 UTC | |
|
Re: Sendmail in a Blackbox
by trantor (Chaplain) on Aug 06, 2001 at 01:47 UTC | |
by Valkerri (Scribe) on Aug 06, 2001 at 03:58 UTC |