PHP Mail Function and Mail headers

Mail Function

mail($to, $subject, $message, $headers);

Mail Headers

//$to = 'bob@example.com';

//$subject = 'Email Subject';

//$message = 'Enter your messages (HTML tags)'

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";


// Additional headers
$headers .= "Organization: Sender Organization\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP". phpversion() ."\r\n" 
 
$headers .= 'To: Twist , Sanu ' . "\r\n";
$headers .= 'From: Birthday Reminder ' . "\r\n";
$headers .= 'Reply-To: Birthday Reminder ' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";

Post a Comment

0 Comments

Close Menu