RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 836 | Replies: 0
Reply
Join Date: Sep 2005
Posts: 139
Reputation: aarya is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
aarya's Avatar
aarya aarya is offline Offline
Junior Poster

Help mailing html file

  #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++;
}
?>
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:26 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC