Jump to content

[SOLVED] Help with Sendmail script


scanner001

Recommended Posts

I have a Flash website that calls a semdmail PHP script to send an email to a user from a contact us form on the website

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

if( $contact_name == true )
{
$sender = "[email protected]";
$receiver = "[email protected]";
$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 website";		
$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();

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

 

 

I need to know how i can add more than one person that the email will be sent to

 

Right now i have one receiver $receiver = "[email protected]"; i need to add another but I'm no PHP guru

Link to comment
https://forums.phpfreaks.com/topic/173101-solved-help-with-sendmail-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.