NET::SMTP ?

for <form method=POST> 

my code as follows:

///////////////////////

#!/perl/bin

$tomail="[EMAIL PROTECTED]";
$location="/webroot/ricardo/";

read(STDIN, $buffer, $ENV { 'CONTENT_LENGHT' } );


 
 use Net::SMTP;

        $smtp = Net::SMTP->new('your.host.beginners.digest'); # connect to an SMTP 
server
        $smtp->mail( '[EMAIL PROTECTED]' );     # use the sender's address here
        $smtp->to('[EMAIL PROTECTED]');        # recipient's address
        
  $smtp->data(
  
  # Split the name-value pairs
     @ pairs = split(/&/, $buffer);
     
     foreach $pair (@pairs) {
 
 local($name, $value) = split (/=/, $pair);
 $value =~ tr/+/ /;
 $value =~ s/% ([a-fA-F0-9] [a-fA-f0-9] ) /pack("C", hex($1))/eg;
 
 #strip off any possible ssi comment tags.
 $value =~ s/<!--(.|\n)*-->//g;
 $in {$name} = $value;
 });                      
 # Start the mail

        # Send the header.
        $smtp->datasend("To: [EMAIL PROTECTED]\n");
        $smtp->datasend("From: [EMAIL PROTECTED]\n");
        $smtp->datasend("\n");

        # Send the body.
        $smtp->datasend("\n");
        $smtp->dataend();                   # Finish sending the mail
        $smtp->quit;                        # Close the SMTP connection
  
  print "Location: $location\n\n"; 


//////////////////////////////////

note: this script should send inscriptions to a database for furthers operations 

thx 

 



---------------------------------
Send your holiday cheer with Yahoo! Greetings.

Reply via email to