TO , CC , BCC in PHP mail()

TO , CC , BCC in PHP mail()

Using mail() function to send mail with to , cc and bcc

$to       = 'ajeetkumar97@gmail.com'; 
$from     = 'ajeetkumardeveloper@gmail.com'; 
$bcc      = 'xyz@gmail.com'; 
$headers  = 'From:  ' . $_POST['firstname'] .' '.$_POST['lastname'].' <' . $from .'>' . " \r\n" ;
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= "Bcc: $bcc\r\n";
$mail = '  
    
Appointment Registration
First Name '.$_POST['firstname'].'
'; mail($to,'Appointment Registration',$mail,$headers);

screen32

Leave a Reply

Your email address will not be published. Required fields are marked *