DeathStar Posted March 27, 2007 Share Posted March 27, 2007 Hi there. I'm making a newsletter script and cant figure this thing out! Its displaying as text not html! Here is my script: <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if($userid != 1) { die("You are not the owner");exit; } if($_POST['mes']) { $ax=mysql_query("SELECT * FROM users",$c); while($r=mysql_fetch_array($ax)) { $to = $r['email']; $subj = "News from Domain.com"; $mess = $_POST['mes']; $headers = "Content-type: text/html; charset=iso-8859-1\r\n"; $headers ="From: [email protected]\r\n"; mail($to,$subj,$mess,$headers); echo "<h2><b>Sent! to {$r['username']}..</b></h2>"; } print "Newsletter sent to ".mysql_num_rows($ax)." Users"; } else { print "Send Newsletter to everyone!!.<br /> <form action='nletter.php' method='post'> <textarea cols=30 rows=15 name='mes'> </textarea> <input type='submit' value='Send!'></form>"; } $h->endpage(); ?> Link to comment https://forums.phpfreaks.com/topic/44560-weaird-email/ Share on other sites More sharing options...
trq Posted March 27, 2007 Share Posted March 27, 2007 $headers = "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: [email protected]\r\n"; Link to comment https://forums.phpfreaks.com/topic/44560-weaird-email/#findComment-216452 Share on other sites More sharing options...
DeathStar Posted March 28, 2007 Author Share Posted March 28, 2007 yep, thats not working.. sends normall text but thats starting to get to old(by meaning out) for new age gaming(aka NAG). Link to comment https://forums.phpfreaks.com/topic/44560-weaird-email/#findComment-216641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.