Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
How do I set up the forms email handler for my website?
www.redealmaker.net
1 Answer
- jason bLv 52 decades agoFavorite Answer
Depends on your webhost. I am no expert but i reccommend
writing an email handling form with php, it's much simpler than CGI script
Php will work well if your webhost supports PHP and SEND MAIL
Php has a built in function called mail.
bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] )
on the page where your visitors type in thier information set variables for the fields if you havent.
add this to the code, before the body tag or somewhere in the body before the fields
<form method="POST" action = "form.php">
form.php is the php form you have written to handle the email.
You can make it exactly the same as any other html page, save it as php
between your body tags type the following
<?php
?>
anything between those tags are processed as php.
try the following
$nameGot = ; //name of person
$from = "From: .\".$HTTP_POST_VARS["nameVar"]<".$HTTP_POST_VARS["emailSender"]."\">";
$subject = $HTTP_POST_VARS["subjectVar"]; // subject
$tel = $HTTP_POST_VARS["telVar"]; // telephone
$to = "Your name <you@redealmaker.net>";
$messageContent = $HTTP_POST_VARS["MessageVar"]."\n"."Name: ".$nameGot."\n"."Tel: ".$tel; // message
$messageContent = StripSlashes($messageContent); // take stuff out htat will confuse server or database
mail($to, $subject, $messageContent, $from)
mail is the function
the items with $ infront are variables
somethingVar is the variables you set for each field on your user input page.
This is just a simple example you are supposed to code checks to make sure users don't leave key fields blank, you are also supposed to check that they came from a vaild page from in your domain and some otehr security checks. I am sadly not an expert.
More info