After successful execution of command I want to send two different mails to two different person through if else function in PHP. I am able to send a mail using below code. How to send another mail with different headers & contents.
// if new reservation has been successfully added to reservation table
// send notification to admin via email
if($result){
$to = $email;
$subject = $reservation_subject;
$message .= $reservation_message."
";
$message .= "Customer name:" .$provinsi."
";
$message .= "Special Request :" .$comment."
";
$from = $admin_email;
$headers = "From:" . $from."
".
mail($to,$subject,$message,$headers);
echo "OK";
}else{
echo "Failed";
}