Click to See Complete Forum and Search --> : Newsletter


Anon
10-31-2000, 04:23 AM
Hello to all phpbuilders,
I would like to ask if it is possible to create a newsletter with php and mysql? If so, were can I get all the documentation?

Thanks for your help

Anon
10-31-2000, 09:55 PM
Hope this gives you an idea,<?

/*GETS CUSTOMER DATA FROM DB TO GENERATE A NEWSLETTER TO CUSTOMERS*/


$sql->Query("Select E_MAIL from CUSTOMERS_DB");
for ($i = 0; $i < $sql->rows; $i++) {
$sql->Fetch($i);
$E_MAIL= $sql->data[0];


$msg = "

$newsletter


";

$recipient = "$E_MAIL";
$subject = "Newsletter from Your COMPANY";
$mailheaders = "From: \n";
$mailheaders .= "Reply-To: contact@pepe\n\n";
mail($recipient, $subject, $msg, $mailheaders);

}

echo("<font size=2 color=red face=verdana>Newsletter has been sent to all our customers</font>");

?>

Anon
11-02-2000, 04:29 AM
Thank-you Pepe for your help :-)))