|
Posted by Neil Trigger on 09/25/05 20:22
Hi everyone,
I am having real problems hiding my users' email addresses and being able to
send them a newsletter. I'm trying:
<?php
$to = 'me@example.com';
// subject
$subject = $_POST['subject'];
// message
$message = nl2br($_POST['letter']);
// 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 .= 'To: Magic2k Newsletter Subscribers <newsletter@example.com>' .
"\r\n";
$headers .= 'From: Magic2k <newsletter@example.com>' . "\r\n";
$headers .= 'Bcc: '.$_SESSION['bcc'].' . "\r\n";
// mail it
mail($to, $subject, $message, $headers);
echo $headers;
?>
I know the session's set correctly, I just don't understand why it's only
emailing me once and not the other times for the bcc test data I put in to
test the darn thing...
Can anyone help? Are the headers being sent correctly? It's starting to
become really frustrating.
Many thanks in advance.
--
Neil Trigger
Magic2k Managing Director
http://www.magic2k.com
http://www.magic2k.co.uk
[Back to original message]
|