PDA

View Full Version : help please!



camaleon
May 12th, 2006, 11:29 AM
Hi Guys.

well i have a php form mail script. that work perfect!!!!, but i want that the form is received in two emails. mymail@aaa.com and mymail2@aaa.com

i want a copy of the form send to my second address.



check the code!!

<?php
$sendTo = "mymail@aaa.com";
$subject = "web form";
$headers = "From: " . $_POST["nombre"];
$message = $_POST["email"] . "\n";
$message .= $_POST["cuerpo"] . "\n";
$nombre = $_POST["nombre"];
mail($sendTo, $subject, $message, $nombre, $headers);
echo "estado=message send!";
?>

regards.

nrirureta
May 12th, 2006, 11:38 AM
i think this is simple.... :sure:


<?php
$sendTo1 = "mymail@aaa.com";
$sendTo2 = "mymail2@aaa.com";
$subject = "web form";
$headers = "From: " . $_POST["nombre"];
$message = $_POST["email"] . "\n";
$message .= $_POST["cuerpo"] . "\n";
$nombre = $_POST["nombre"];
mail($sendTo1, $subject, $message, $nombre, $headers);
mail($sendTo2, $subject, $message, $nombre, $headers);

echo "estado=message send!";
?>

bwh2
May 12th, 2006, 11:44 AM
search the forums for: multiple addresses

camaleon
May 12th, 2006, 02:17 PM
thanks so much nrirureta! work fine :)

nrirureta
May 12th, 2006, 03:23 PM
thanks so much nrirureta! work fine :)

ur welcome...