( PHP ), " ", : to, subject, message headers
Let me know if you want to create a form to fill out and run this PHP script, otherwise you can simply enter everything in this file manually, save it as a PHP file, upload it to a server that supports PHP, and go to the file in your browser.
Here is the code:
$to = 'johndoe@google.com' . ','
$to .= 'janedoe@msn.com';
$subject = 'PHP Email Script - Test Email';
$message = '
<html>
<head>
<title>PHP Email Script</title>
</head>
<body>
<p style="background: #ccc; width: 100%;">Test Email Script</p>
</body>
</html>
';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\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($to, $subject, $message, $headers);
source
share