mailing html file

Reply

Join Date: Sep 2005
Posts: 139
Reputation: aarya is an unknown quantity at this point 
Solved Threads: 0
aarya's Avatar
aarya aarya is offline Offline
Junior Poster

mailing html file

 
0
  #1
Apr 26th, 2006
i want to send the newsletter to all those who subscribe to my website.
i ahve a templetae with table navigation ,site logo,some images.
i wnat to send news letter with all this . i create the html file .
can i do thsi code to send

<?INCLUDE 'd.php';
$title=$_GET['title'];






$sel=mysql_query("select * from news where title='$title'") or die("no");
$n1=mysql_num_rows($sel);
$i1=0;


while($i1<$n1)
{
$news=mysql_result($sel,$i1,"news");
$title=mysql_result($sel,$i1, "title");

$i1++;
}








$sel=mysql_query("select * from newemail");
$n=mysql_num_rows($sel);
$i=0;
while($i<$n)
{
$to=mysql_result($sel,$i,"email");
$name=mysql_result($sel,$i,"name");

the main logic i am thinking to send to the subscriber


$message=" Dear $name <br><br>

include 'newsletter.html'";





// 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:mysite.com <customer@mysite.com>' . "\r\n";

$subject="News letter from mysite";

mail($to, $subject, $message, $headers);
print "Newsletter is sent to $to";print "<br>";
$i++;
}
?>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC