PDA

View Full Version : PHP Flash Emailer Help



elgringoson
August 15th, 2008, 09:47 AM
Afternoon all,

I'm currently having problems with the .php form for a simple emailer. I can get it to work on my servers after following the tutorial, but at work it's a no go. After spending the last hour messing around with the code I'm stumped. I am trying to change the 'from' address to Admin@xxxxx.com instead of the users email, this is the code I'm working with:


<?php
$sendTo = 'David@xxxxx.com';
$subject = 'Test Email';
$headers = 'From: Admin@xxxxx.com' . "\r\n" .
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>

I tried using a mix between the code at http://www.php.net/manual/en/function.mail.php and kirupa. I'm new at php so any help would be much appreciated :beer2:

drgnfly1007
August 18th, 2008, 05:12 PM
Try typing the $message that you want to send in parentheses without the use of post just as you have the other variables.