zero-perfoliate
zero-perfoliate

Author Topic: How to change this to send email to more than one person  (Read 262 times)

Offline Liam

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
How to change this to send email to more than one person
« on: August 18, 2009, 05:33:57 AM »
Hi,

I have this contact form that is being called from a Flash site. I would like to add two receivers to this    $receiver = "user1@abc.com"; but I dont know how to as i'm a newbe to PHP can you help


Code: [Select]
<?php
$contact_name 
$_POST['name'];
$contact_email $_POST['email'];
$contact_subject $_POST['subject'];
$contact_message $_POST['message'];

if( 
$contact_name == true )
{
$sender "webmaster@abc.com";
$receiver "user1@abc.com";
$client_ip $_SERVER['REMOTE_ADDR'];
$email_body "Name: $contact_name \nEmail: $contact_email \nSubject: $contact_subject \nMessage: $contact_message \nIP: $client_ip \nContact Form Provided by abc";
$extra "From: $sender\r\n" "Reply-To: $sender \r\n" "X-Mailer: PHP/" phpversion();

if( mail$receiver"abc Contact Form - $subject"$email_body$extra ) ) 
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>


 

zero-perfoliate