Hi,
I'm working on a mass e-mail manager, and I'm having a little trouble getting it to create all the headers on the message that I want. I'm sending the messages from a Windows NT box, and can't get the blind carbon copies to come through to myself. Here's a copy of the code that I'm using to try and send the message to each user, and send myself a blind carbon copy:
// TAKE OFF THE \n OFF LAST LINE OF HEADER IF YOU ADD MORE
if($first_name == "") { $headers .= "To: ".$recipient."\n"; }
else { $headers .= "To: ".$first_name." ".$last_name." <".$email_address.">\n"; }
if($signature == "shaun-pwc") {
$headers .= "From: Shaun Worcester - Perpetual Web Creations <shaun@perpetual-web.com>\n";
$headers .= "bcc: Shaun Worcester - Perpetual Web Creations <shaun@perpetual-web.com>\n";
$headers .= "Disposition-Notification-To: Shaun Worcester - Perpetual Web Creations <shaun@perpetual-web.com>\n";
}
if($signature == "webmaster") {
$headers .= "From: Perpetual Web Creations <webmaster@perpetual-web.com>\n";
$headers .= "bcc: Perpetual Web Creations <webmaster@perpetual-web.com>\n";
$headers .= "Disposition-Notification-To: Perpetual Web Creations <webmaster@perpetual-web.com>\n";
}
$headers .= "Content-Type: text/html; charset=iso-8859-1";
mail($recipient, $subject, $message, $headers) OR $errors++;
If anyone has any ideas, I'd really appreciate it.
Thanks,
Shaun