in reply to Any Examples on how to send via email a reply to my HTML form:
Note: I borrowed most of code from this node, and I haven't tested. I hope that this is what you are after.$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
|
|---|
| 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 |