spewn
Programmer
- May 7, 2001
- 1,034
my hosting co. says it's not them, and the location of their sendmail program is correct. yet still, i cannot receive email, even though no errors come up and i get redirected to the right page...
any help appreciated
**
#!/usr/local/bin/perl
%postInputs = readPostInput();
$dateCommand = "date";
$time = `$dateCommand`;
$sh = $postInputs{'shr'};
$dr = $postInputs{'dir'};
$mn = $postInputs{'mnu'};
$sn = $postInputs{'snv'};
$url = $postInputs{'url1'};
open (MAIL, "|/var/qmail/bin/qmail-inject" || return 0;
select (MAIL);
print << "EOF";
To: ask\@anymail.net
From: $postInputs{'eml'}
Subject: $postInputs{'sbj'}
Comments: $postInputs{'msg'}
EOF
close(MAIL);
select (STDOUT);
printThankYou();
sub readPostInput(){
my (%searchField, $buffer, $pair, @pairs);
if ($ENV{'REQUEST_METHOD'} eq 'POST'){
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;
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$searchField{ $name} = $value;
}
}
return (%searchField);
}
sub printThankYou(){
print << "EOF";
Location:
EOF
}
**
it was working previously, but i attempted to rewrite it so i could sending html in the emailk which failed, and after i put it back to the way it was, i noticed the problem...so whether it was there before and i didn't notice, or i did something wrong (most likely); either way, i'm not able to find the error.
thanks...
- spewn
any help appreciated
**
#!/usr/local/bin/perl
%postInputs = readPostInput();
$dateCommand = "date";
$time = `$dateCommand`;
$sh = $postInputs{'shr'};
$dr = $postInputs{'dir'};
$mn = $postInputs{'mnu'};
$sn = $postInputs{'snv'};
$url = $postInputs{'url1'};
open (MAIL, "|/var/qmail/bin/qmail-inject" || return 0;
select (MAIL);
print << "EOF";
To: ask\@anymail.net
From: $postInputs{'eml'}
Subject: $postInputs{'sbj'}
Comments: $postInputs{'msg'}
EOF
close(MAIL);
select (STDOUT);
printThankYou();
sub readPostInput(){
my (%searchField, $buffer, $pair, @pairs);
if ($ENV{'REQUEST_METHOD'} eq 'POST'){
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;
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$searchField{ $name} = $value;
}
}
return (%searchField);
}
sub printThankYou(){
print << "EOF";
Location:
EOF
}
**
it was working previously, but i attempted to rewrite it so i could sending html in the emailk which failed, and after i put it back to the way it was, i noticed the problem...so whether it was there before and i didn't notice, or i did something wrong (most likely); either way, i'm not able to find the error.
thanks...
- spewn