The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> I'm telling you man, it was working!
post Oct 30 2006, 05:43 PM
Post #1

Advanced Member

Group: Members
Posts: 175
Joined: 12-September 06
Member No.: 118

I created this PHP script to get every email on a MySQL db and email a newsletter to them. It was working, but I did something and now it doesn't. Help!

$emails = mysql_query("SELECT * FROM `newsletter`"); //Get emails
$email = mysql_fetch_array($emails); //Get one email
$to = $email[0];
while ($email = mysql_fetch_array($emails))//Get the rest of the emails, adding a comma
$to = ", ".$email[0];
$to = "******@********.***"; //Just temporarely for testing
$subject = "Clock Tower Gifts Newsletter"; //Set the subject
$message = $hiddentext; //Get $hiddentext (The message) to transfers it's data to $message (Just for organization)
$headers = "From:\r\nReply-To:"; //Set the headers
if ($textarea==0) //Is it an HTML message?
$headers .= "\r\nMIME-Version: 1.0\r\nContent-Type: text/html; charset=iso-8859-1\r\n"; //If it is, set some additional headers
mail ($to,$subject,$message,$headers); //Send the message!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


- Lo-Fi Version Time is now: 15th January 2019 - 06:00 PM