View Single Post
  #3 (permalink)  
Old 03-01-2008, 07:51
Coomkeen Coomkeen is offline
Junior Member
 
Join Date: Jan 2008
Posts: 11
Default

I use something similar and have had no problems:

while($row=mysql_fetch_row($result)) {
$name=$row[0];
$email=$row[1];
$body="";
$headers=$head . "Content-type: text/html; charset=iso-8859-1" . $eol . $eol;
$body="<p> Dear " . $name . ",</p>";
$body.=$tb;
mail($email, $subject, $tbody, $headers);
echo("<br>sent to " . $email );
$body="";
}

I've left out the unsubscribe link and other stuff for clarity.

The only 'problem' I now think I might have is some people's newsletters get classed as spam by Yahoo and others.
This isn't a general thing, but it does happen.
And when I look at the headers of my copy sent to me, it's got:

Sender: Nobody <nobody@sutherland.eukhost.com>

Anyone know a way around this?

I've got:

$head="Reply-To: \"Smallholders Online Newsletter\" <newsletter@smallholders.org>\n";
$head.="Return-Path: <newsletter@smallholders.org>\n";
$head.="From: \"Smallholders Online Newsletter\" <newsletter@smallholders.org>\n";

in the email header.

Ron.
Reply With Quote