0

i want to send 2 persons mailid in this mail

<?php 
$con = mysql_connect("localhost","root",""); 
if (!$con) 
  { 
  die('Could not connect: ' . mysql_error()); 
  } 

mysql_select_db("users", $con); 

$sql="INSERT INTO entryform (Name,Department, Problem, Ext_no, Ip_Add, Remark, Email ,status) 
VALUES ('$_POST[Name]','$_POST[Department]','$_POST[Problem]','$_POST[Ext_no]','$_POST[Ip_Add]','$_POST[Remark]','$_POST[Email]','$_POST[status]')"; 

if (!mysql_query($sql,$con)) 
  { 
  die('Error: ' . mysql_error()); 
  } 
  echo ""; 


mysql_close($con); 




$to = "SUPPORT.KAIZEN@rpr.jspl.com"; 

$subject = $_POST['Problem'];
$message = " Dear Sir,
                        Your Complaint Deatils is :--



  Name: " . $_POST['Name'] . " 

 Department: " . $_POST['Department']. " 

 Problem:".$_POST['Problem'] . "

 Ext no. : " . $_POST['Ext_no'] ."

 IP Add: " . $_POST['Ip_Add'] . "

 Remark: " . $_POST['Remark'] . "

 Email: " . $_POST['Email'] . "

 status: " . $_POST['status'] ;

 $message.=


 " 



 Thank you



 Regards,
Helpdesk Raipur

 ";


$sent = mail($to,$subject, $message  ) ;  

if($sent)  
{print "  "; } 
else  
{print "We encountered an error sending your mail"; } 

?>

Edited by naru vaishnaw

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by pritaeas
0

If you want to send that mail to two persons, then add a second email address in $to separated by a semi-colon.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.