RE: cgi script error

by Blue Tapp <blue(at)bluesarthouse.com>

 Date:  Fri, 11 May 2001 11:54:09 -0500
 To:  Lyle <Lyle(at)lcrcomputer.com>
 Cc:  hwg-servers(at)hwg.org
 In-Reply-To: 
  todo: View Thread, Original
This is running on a Windows2000 server.  Could that be one of the problems (the script is written for Unix and yes I'm showing my total ignorance about this here).  I've used scripts like this before on Unix servers with no problem.  Anyway, the entire script has been copied to the very bottom of this mail.
Thanks!
Blue

At 10:52 AM 5/11/01 -0500, you wrote:
>But whatever it is, they don't like something.  Is this script running on a
>Unix server?  The -t may also be a clue that something is not setup
>correctly.  That is a 'normal' command line option for Sendmail on Unix
>servers and something may not be getting parsed correctly as the script
>runs.
>
>Lyle
>
>-----Original Message-----
>From: Blue Tapp [mailto:blue(at)bluesarthouse.com]
>Sent: Wednesday, May 09, 2001 6:27 PM
>To: hwg-servers(at)hwg.org
>Subject: cgi script error
>
>
>I have installed a cgi-script on my host's server to "recommend this site."
>I am getting the following error message when I try to use the form:
>
>Stalkerlab's SMTP Mailer V1.20 Start mail input; end with ... Local Host:
>ipewhw0160atl2 Looking up for mail gateway... Remote Host Name:
>mailhub.registeredsite.com IP Address: 64.224.9.20 Connected to remote SMTP
>port: 220 mail4.registeredsite.com ESMTP SMTP Service (NO SPAM/UCE) Sending
>HELO ipewhw0160atl2... 250 mail4.registeredsite.com Hello
>fashionfabricsclub.com [64.225.254.202], pleased to meet you Sending MAIL
>FROM: ... 250 2.1.0 ... Sender ok Sending RCPT TO: <-t>... 550 5.1.1 <-t>...
>User unknown Sending QUIT... 221 2.0.0 mail4.registeredsite.com closing
>connection WARNING: Mail NOT sent! Cannot open file .\dead.letter.txt
>Connection closed Program aborted
>
>I assume that this means this type of mail has been blacklisted as spam?  If
>so, any advice on what my options are would be appreciated.  You can see the
>form in question at
>http://www.fashionfabricsclub.com/home/test/send2them.html
>
>Thanks!
>Blue
>
>
>www.bluesarthouse.com

Blue Tapp
Blue's ArtHouse Graphics & Web Design
705 North Florissant Road
Ferguson, MO 63135
(314) 839-0634
fax: (314) 839-1557
e-mail: blue(at)bluesarthouse.com
alt. e-mail: bluesarthouse(at)mail.com
url: www.bluesarthouse.com

"Time to get a web site!"

#!/usr/bin/perl
##########################
#   OutTel.com Scripts   #
##########################

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
        ($name, $value) = split(/=/, $pair);
        $value =~ tr/+/ /;
        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
        $value =~ s/\n/ /g;

        $request{$name} = $value;


}

$url = "http://www.fashionfabricsclub.com";
$maillocation = "c:/winnt/system32/mail.exe";

$stmail="$request{'stmail'}" ;
$tmail="$request{'tmail'}" ;
$tnmail="$request{'tnmail'}" ;

if ($tmail eq "") {
        print "Content-type: text/html\n\n";
        print "You didnt enter your address.";
        exit;
        
}
if ($stmail eq "") {
        print "Content-type: text/html\n\n";
        print "You did not enter your friends address.";
        exit;
        
}

print "Content-type: text/html\n\n"; 
print "<Head><title>Sent!</title></head><body>\n";
print "<center><BR>Thank you for recomending this site.<BR>\n";
print "The message has been sent.<BR>\n";
print "<BR><A HREF=$url>Go back to our web site.</A></center><body>\n";
print "<P><P>\n\n";

open (MAIL, "| $maillocation -t") || die "aw, cant use $maillocation";
print MAIL "To: $stmail\n";
print MAIL "Reply-to: $tmail\n";
print MAIL "From: $tmail\n";
print MAIL "Subject: Cool Site Check it Out\n";
print MAIL "Hey, I found a cool web site that might interest you.\n\n";
print MAIL "Check it out at:\n";
print MAIL "$url\n\n";
print MAIL "From $tnmail\n\n";

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA