All,
I am new to Perl, and as such has only started to look at some simple commands, such
as a guestbook email document.
When on on page, I ask the user to complete an email field, when the email is
received, the email address is changed to say :-
[EMAIL PROTECTED]
instead of [EMAIL PROTECTED] for instance (not a real email account).
The perl coded is :-
#!/usr/bin/perl
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;
$FORM{$name} = $value;
}
open (MESSAGE,"| /usr/sbin/sendmail -t");
print MESSAGE "To: $FORM{submitaddress}\n";
print MESSAGE "From: $FORM{name}\n";
print MESSAGE "Reply-To: $FORM{email}\n";
print MESSAGE "Subject: Feedback from $FORM{name} at $ENV{'REMOTE_HOST'}\n\n";
print MESSAGE "The user wrote:\n\n";
print MESSAGE "$FORM{feedback}\n";
# This line will print a personal thankyou back
# print MESSAGE "Thank you $FORM{name} for writing.\n";
close (MESSAGE);
&thank_you;
}
Basically I am then unable to get back in touch with the sender.
Your help in this will be greatly appreciated.
Regards
Matthew