hi i'm currently sending multi email recipients in one go is it possible to send it individually? please help thank you.
Code:
<?php
require_once 'library/config.php';
?>
<?php
$qe = "SELECT `cust_id`, `cust_name`, `cust_email`, `cust_phone`, `cust_address`, `cust_city`, `cust_state`, `cust_country`, `cust_pin`, `cust_spec_note` FROM `sland_pizza_customer` WHERE 1";
$re = dbQuery($qe);
if(dbNumRows($re)>0)
{
while($ra = dbFetchAssoc($re)):
$cust_email .=$ra['cust_email'].","." ";
endwhile;
}
$to = $cust_email; // sender
$subject = 'Get 5% Discount Every Order';
// 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";
$headers .= 'From: yoursite Penrith<newsletter@yoursite.com.au>' . "\r\n";
// Put your HTML here
$message = file_get_contents('marketing.html');
// Mail it
mail($to, $subject, $message, $headers);
echo "It's Sent";
?>
Comment