If I have a forms page that asks for the persons title, first and last name and there email address. How would i send html formatted e-mail to the address given by the user.
$smtp->data();
$smtp->datasend("To: $masteremail\n"
$smtp->datasend("To: $useremail\n"
$smtp->datasend("From: $fromemail\n"
$smtp->datasend("Subject: Thank you for visiting domain.com\n"
$smtp->datasend("\n"
$smtp->datasend("\n"
$smtp->datasend("\n"
$smtp->datasend("A copy of your comments can be found below\n"
$smtp->datasend("======================================\n"
$smtp->datasend(" NAME: $username($userip) at $daten($timen)\n"
$smtp->datasend(" EMAIL: $useremail\n"
$smtp->datasend(" HOME PAGE: $userurl\n"
$smtp->datasend(" \n"
$smtp->datasend(" $comments\n"
$smtp->datasend("======================================\n"
$smtp->dataend();
}
&guestbook_succ("Thank you for signing our GuestBook!<br>Your message has been successfully posted!!"
} Newposter
"Good judgment comes from experience. Experience comes from bad judgment."
Here's a perl script to check forms, and send an email in whatever format makes sense. Nice, simple PERL program for processing forms however you want to process them, easy to install.
Download from ftp://ftp.sudval.org/users/sgray/cgi/mailing-cgi-v1.0.tgz -- info from the Linux Software Map at ftp://ftp.sudval.org/users/sgray/cgi/mailing-cgi.lsm
Newposter has a good script there for you, but not really sure why s/he decided to go with SMTP. As far as I can recal you can use HTML using sendmail and just a simple mailto form, it all depends on the recipient's mail client as to if they will accept HTML or not.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.