<?php
// multiple recipients
//$to = 'satheesh@iv.bh' . ', '; // note the comma
//$to .= 'satheesh.tasks@gmail.com';
// subject
$subject = 'Birthday Reminders for August';
// message
$message = '
<html>
<head>
<title>'.$subject.'</title>
</head>
<body>
<p>Hi, <br>Please find the login credentials</p>
<p>Username : <br> Password : </p>
</body>
</html>
';
// 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
$to1 = 'Satheesh <satheesh.tasks@gmail.com>';
$to2 = 'Satheesh <satheesh@iv.bh>';
$headers .= 'To: '.$to1.', '.$to2.'' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
//$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
//$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
// Mail it
if(mail($to, $subject, $message, $headers))
echo "Mail sent";
else echo "Can't send";
?>
No comments:
Post a Comment