in reply to Any Examples on how to send via email a reply to my HTML form:

If you are using unix you could use sendmail, which is a very common unix program.
$mail_prog = "/usr/sbin/sendmail"; if ($email eq "no") { #Do your html stuff } else { &SendMail($reciptent, $sender); } sub SendMail { my ($recipient,$sender) = @_; open(MAIL, "|$mail_prog -t") || &error("Could not send out emails" ); print MAIL "To: $recipient \n"; print MAIL "From: $sender <$sender>\n"; print MAIL "Subject: database entry\n"; print MAIL "added\n\n"; print MAIL"------------------------------------------------------- +----------------------------------\n"; print MAIL ""; print MAIL "\n\n"; print MAIL "\n\n"; close (MAIL); } # end SendMail function
Note: I borrowed most of code from this node, and I haven't tested. I hope that this is what you are after.
Regards,
Gerard
Update: Hmmmm, It seems that I may have completely misread the question. Oh well, I haven't slept in over forty hours, so I suppose I can be excused : )
  • Comment on Re: Any Examples on how to send via email a reply to my HTML form:
  • Download Code

Replies are listed 'Best First'.
Re: Any Examples on how to send via email a reply to my HTML form:
by Spenser (Friar) on Dec 13, 2001 at 00:11 UTC

    Regarding the e-mail portion of your question, I did something that looks a lot like Gerard's above (we must have the same collection of books), but I used the Mail perl module:

       use Mail::Mailer;

    My code that relates to the e-mailing is as follows:

    $mailer = Mail::Mailer->new("mail"); $mailer->open({From=>$from_address, To=>$to_address, Subject=>$subject, }) or die "Can't open: $!\n"; print $mailer @body; $mailer->close();

    Of course, the string variables are all set in code lines above this excerpt.