
Gzaector
Deleted
Jul 18, 2000, 8:31 AM
Post #3 of 4
(1574 views)
|
im using sendmail here is my code #!/usr/local/bin/perl # #©2000 John Richards # 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 (EMAIL,"|/usr/lib/sendmail -t"); print EMAIL "To: $FORM{reciever}\n"; print EMAIL "From: $FORM{name}\n"; print EMAIL "Reply-To: $FORM{email}\n"; print EMAIL "Subject: Spudweb Studios\n\n"; print EMAIL "The visitor wrote:\n\n"; print EMAIL "$FORM{comments}\n\n"; if ($FORM{want_reply} eq "Yes") {print EMAIL "*---Visitor wants a reply---*\n"; } else {print EMAIL "*---Visitor does not want a reply\n"; } close (EMAIL); &returnspudweb; sub returnspudweb { print "Location: http://www.spudweb.com\n\n"; } }
|