| | |
mailing html file
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
the main logic i am thinking to send to the subscriber
?>
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++;
}
![]() |
Similar Threads
- desktop html file missing (Windows NT / 2000 / XP)
- Can JMenuItem point to a HTML file that opens in IE? (Java)
- Opening HTML file from Program (Visual Basic 4 / 5 / 6)
- Help!! Applet only works in AppletViewer but not in html file with <applet> tags!!! (Java)
- How to display a HTML file (in browser window) from Java Program...? (Java)
Other Threads in the PHP Forum
- Previous Thread: need help exporting oracle data using php ASAP
- Next Thread: Read data from Access Database through PHP
| Thread Tools | Search this Thread |
advanced apache api array beginner binary broken cakephp check checkbox class cms code cookies cron curl database date datepart display dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google head href htaccess html if...loop image include includingmysecondfileinthechain insert ip javascript job joomla jquery key library limit link login mail menu mlm multiple mysql oop password paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote screen script search server sessions smarty sms sorting source space sql startup stored syntax system table traffic tutorial unicode update upload url validator variable video web youtube zend





