- Create an HTML page you want to send out:
<html>
<head>
..
</head>
<body>
Hi <?php echo $FirstName . ' '. $LastName?><BR>,
Good to hear from you! etc.
</body>
Make sure all images and links are absolute (this si going out via email)
- Heres' the code:
(I'm attaching the respective files, change their extensions to .php);
include('function_string_compiler_i1.php');
include('function_enhanced_mail_v100.php');
$newsletter = implode('',file('the_newsletter_above.php'));
while($r=mysql_fetch_array($result) /* or use CSV if you want*/)){
extract($r);
//compile the newsletter with the variables
$thisNewsletter=string_complier_i1($newsletter);
//send out the mail:
enhanced_mail($Email, "Newsletter for you, $FirstName", $thisNewsletter, "HTML", "subscriptions@mysite.com");
}