TO , CC , BCC in PHP mail()
- سُلَيْمَان بْن دَاوُوْد

- Jun 5, 2020
- 1 min read
Using mail() function to send mail with to , cc and bcc
$to = 'nate@wpfixxyz.com'; $from = 'nate@yopmail.com'; $bcc = 'alan@brogan.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 = ' <table> <tr><th colspan="2">Appointment Registration</th></tr> <tr><td><strong>First Name</strong></td> <td>'.$_POST['firstname'].'</td> </tr> </table>'; mail($to,'Appointment Registration',$mail,$headers);
Comments