I finally got the email format taken care of thanks to Weedpacket, but now I have another question.
Below is my code:
<?php
$odate = date("Ymd");
$uploaddir = '/tmp/';
$percust= ''; {
$row = 1;
$handle = fopen($uploaddir.$odate."orders.txt","r");
while ($data = fgetcsv ($handle, 1000, "|")) {
$num = count ($data);
print "<br><br>\n";
$row++;
for ($c=0; $c < 1; $c++) {
$message =
"A quick note from " . $data[5] . " at " . "<a href=\"$data[8]\">$data[3]</a>" . ":" . "<br><br>\r\n".
"Dear " . $data[0] . " " . $data[1] . "," . "<br>\n".
"We wanted to let you know that your order from " . "<a href=\"$data[8]\">$data[3]</a>". " " . "was
shipped on <font color=red><b>" . $data[6] . ".</font></b> Your <b>" . $data[4] . " </b>should arrive at your door in
a short time. We truly value our customers and pride ourselves on our quality
products and customer service. If you have any questions please fell free to
contact Customer Service at (xxx) xxx-xxxx. They will be more than happy to
assist you. <br><br>\n".
"We wanted to take a quick opportunity to tell you about another product you may
enjoy. Our " . '<a href=' . $data[9] . '>' . $data[7] . '</a>' . " is a very popular item on our site. Be sure to check
it out at " . '<a href=' . $data[8] . '>' . $data[3] . '</a>' . ".<br><br>\n";
$headers = "MIME-Version: 1.0\r \n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r \n";
$headers .= "From: \"$data[5]\" <$data[5]>\r \n";
echo ($message);
Need TO STOP HERE and place a button that will trigger the mail event below. I want to be able to review the emails printed above before they just get sent out. After I think they are ok, then I will send them by pressing the button.
mail($data[2], 'A quick note from ' . $data[3].'', $message, $headers);
}
}
}
fclose ($handle);
?>
So, how is this accomlished?
Regards,
Eric