Hi there I have a fairly simple mailer php
[php]<?php
require_once(‘recaptchalib.php’);
$privatekey = “*******”;
$resp = recaptcha_check_answer ($privatekey,
$_SERVER[“REMOTE_ADDR”],
$_POST[“recaptcha_challenge_field”],
$_POST[“recaptcha_response_field”]);
if(!$resp->is_valid) {
header(“location:error.php”);
die();
}
$ip = $_SERVER[‘REMOTE_ADDR’];
$name = $_POST[‘name’];
$email = $_POST[‘email’];
$type = $_POST[‘type’];
$contact = $_POST[‘contact’];
$message1 = $_POST[‘message1’];
$formsub = $_POST[‘Submit’];
if($formsub){
$mailMessage = “Invitation Request\n\n”;
$mailMessage .= “IP: " .$ip.”\n\n";
$mailMessage .= “Desired Username: " .$name.”\n\n";
$mailMessage .= “E-Mail :” .$email."\n\n";
$mailMessage .= “Alt Contact: " .$type.”\n\n";
$mailMessage .= “” .$contact."\n\n";
$mailMessage .= “Comments: " .$message1.”\n\n";
$header = "From:[email protected]\r\n";
$header .= “Reply-To: [email protected]\r\n”;
$header .= “Return-Path: [email protected]\r\n”;
mail(‘[email protected]’, ‘Request Form’, $mailMessage,$header);
header(“location:thanks.php”);
exit;
}
?> [/php]
It works perfectly, what i want to do though is try and make
“$header = "From:[email protected]\r\n”;" and
"$header .= “Reply-To: [email protected]\r\n” link with
“$email = $_POST[‘email’];” so that both from and reply to show the email the person entered in my form.
Also how would I go about changing the subject of the form, at the moment it is “Request Form” is there a way to make it “Request Form - ( $name = $_POST[‘name’]; )” This last one isn’t as vital as the top one.
Any help is appreciated.