this is sent off a post on another page, in other words someone is adding there email on page one and this is getting sent off page two.... how do i change the recipient to be the email address they entered?
if ($name <> "")
{
$message = "From: ";
$message .= $name;
$message .= "\n\n";
}
if ($email <> "")
{
$message = "Email: ";
$message .= $email;
$message .= "\n\n";
}
$message .= $feedback;
/* this is what i'm talking about*/
$recipient = "NZ <$email>"; //note the comma
/* subject */
$subject = "NZ";
/* message */
/* additional header pieces for errors, From cc's, bcc's, etc */
$headers .= "From: Rugby League in New Zealand Membership <email@email.nz>\n";
$headers .= "X-Sender: <rleague@rleague.com>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "Return-Path: <rleague@rleague.com>\n"; // Return path for errors
/* If you want to send html mail, uncomment the following line */
// $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
//$headers .= "cc:birthdayarchive@php.net \n"; // CC to
//$headers .= "bcc:birthdaycheck@php.net, [email]birthdaygifts@php.net[/email] \n"; // BCCs to
/* and now mail it */
mail($recipient, $subject, $message, $headers);