if you want your server to send it out, then yes you'll need a mail server running. Tiger comes with Postfix already, it's only a matter of enabling it.
Most easily done with
Postfix Enabler but can be done by editing a few system conf files - there's a hint
here (it's for Panther but i think it still applies).
Then you need to send the mail to Postfix from the form.
Not sure about other alternatives, but it's pretty straightforward in PHP using the mail() function:
Code:
<?
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "you@yours.com";
$Subject = "Email Subject";
$Name = Trim(stripslashes($_POST['Name']));
$Address = Trim(stripslashes($_POST['Address']));
$Telephone = Trim(stripslashes($_POST['Telephone']));
$Message = Trim(stripslashes($_POST['Message']));
// validation
$validationOK=true;
if (Trim($EmailFrom)=="") $validationOK=false;
if (Trim($Name)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=contacterror.html\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Address: ";
$Body .= $Address;
$Body .= "\n";
$Body .= "Telephone: ";
$Body .= $Telephone;
$Body .= "\n";
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=contactok.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=contactbad.html\">";
}
?>