This the entire code that I want to use to sent the email:
I use it on two other forms and it works perfectly.
I got this code out of a book called CGI Programming 101.
Their is a web site
Note that I do get the last two lines of the print MAIL.
Which are:
The above information is a new entry in your guest book
If you deem this entry unappropriate, you may delete it here:
How ever the above information the first lin talks about is what I do not recieve.
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;
$guestbook{$name} = $value;
}
#Format and send the E-mail
#Where is E-mail Program
$mailprog = '/usr/lib/sendmail';
#Who gets E-mail
$recipient = 'kevin@lyndatyler.com';
#Who is the mail from
$from = $mes{email};
$reply = $mes{email};
#Open mail program or dienice
open (MAIL, "|$mailprog -t") or dienice("Can't find Mail Program!!\n");
print MAIL "From: $from\n";
print MAIL "Reply-To: $reply\n";
print MAIL "To: $recipient\n";
print MAIL "Subject: New Guest Book Entry\n";
print MAIL "Name: $guestbook{'fname'} $guestbook{'lname'}\n";
print MAIL "Age: $guestbook{'age'} Precint: $guestbook{'precint'}\n";
print MAIL "Comments: $guestbook{'comments'}\n\n";
print MAIL "The above information is a new entry in your guest book\n";
print MAIL "If you deem this entry unappropriate, you may delete it here:
close (MAIL);
KJW