So, I have this code :
PHP Code:
<?php $to = "xxx@domain.com"; $subject = "Message {$_POST['ams']['Destination']} "; $from = $_POST['ams']['Name']; $valid=1; $message =''; foreach ($_POST['ams'] as $k=>$v){ if (trim($v)=='')$valid=0; $k = str_replace('_',' ',$k); $message .="$k : $v<br>"; } $message .="<hr />IP: {$_SERVER['REMOTE_ADDR']}"; function sndmail($from,$to,$subject,$message){ $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From:".$from ."\r\n"; mail($to, $subject, $message, $headers); } if ($valid=='1') { sndmail($from,$to,$subject,$message); header( 'Location: http://www.domain/succes.html' ) ; } else header( 'Location: http://www.domain.com/error.html' ); ?>
I want when soemone sent an e-mail with this contact form, the e-maill to arrive on xxx@domain.com and on xxx2@domain.com.
Can anyone help me please ?
LE: Solved.
$to = "xxx@domain.com, xxx2@domain.com";
Last edited by RedPitbull; 03-30-2011 at 11:30 AM..
|