optikalefx Posted August 11, 2007 Share Posted August 11, 2007 how do you mail to multiple people? <?php $name = $_POST["namee"]; $sendTo = "[email protected]"; $subject = "Prompt Service Estimate"; $headers = "From: " . $_POST["namee"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $message = "Name:: " . $_POST["namee"] ."\r\n"; $message .= "Email:: " . $_POST["email"] ."\r\n"; $message .= "Home Phone:: " . $_POST["hphone"] ."\r\n"; $message .= "Cell Phone:: " . $_POST["cphone"] ."\r\n"; $message .= "Address:: " . $_POST["adres"] ."\r\n"; $message .= "Message:: " . $_POST["message"]; mail($sendTo, $subject, $message, $headers); header("Location: http://www.promptroofingmd.com/thankyou.htm"); ?> would i just add $sendTo .= "other address"; as many times as needed? Link to comment https://forums.phpfreaks.com/topic/64359-php-mail/ Share on other sites More sharing options...
trq Posted August 11, 2007 Share Posted August 11, 2007 Its all covered in the manual. Link to comment https://forums.phpfreaks.com/topic/64359-php-mail/#findComment-320908 Share on other sites More sharing options...
pyrodude Posted August 11, 2007 Share Posted August 11, 2007 I find loops to be the best method, that way each person who receives the email only sees themselves as a recipient Link to comment https://forums.phpfreaks.com/topic/64359-php-mail/#findComment-320945 Share on other sites More sharing options...
tmyonline Posted August 11, 2007 Share Posted August 11, 2007 Do this: mail($sendTo, $subject, $message, $headers, 'Bcc: [email protected], [email protected], [email protected]'); Hope this helps. Link to comment https://forums.phpfreaks.com/topic/64359-php-mail/#findComment-320955 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.