Reply to Newsletter BCC script

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация