bowenmedia Posted August 19, 2008 Share Posted August 19, 2008 Hello, below is the simple form processor I use on for one of my sites. Can someone please show me how I can make this script send the email to multiple contacts? like a CC I appreciate any help with this. <?php if ($_SERVER['REQUEST_METHOD']=="POST"){ if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 || !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])) die("Bad referer"); $msg="Website Message:\n\n\n"; foreach($_POST as $key => $val){ if (is_array($val)){ $msg.="Item: $key\n\n"; foreach($val as $v){ $v = stripslashes($v); $msg.=" $v\n\n"; } } else { $val = stripslashes($val); $msg.="$key: $val\n\n"; } } $recipient="[email protected]"; $subject="SUBJECT"; error_reporting(0); if (mail($recipient, $subject, $msg)){ header( "" ); } else echo "An error occurred and the message could not be sent."; } else echo "Bad request method"; ?> Link to comment https://forums.phpfreaks.com/topic/120303-help-with-processor-script/ Share on other sites More sharing options...
unkwntech Posted August 19, 2008 Share Posted August 19, 2008 $recipient ="[email protected]" . ", "; //NOTE the , between each email. $recipient .= "[email protected]"; Link to comment https://forums.phpfreaks.com/topic/120303-help-with-processor-script/#findComment-619845 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.