Jump to content

Teds455

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Teds455's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Crayon Violent- You are an absolute genius!! I know it was a simple problem, but how incredibly frustrating! I've been pushing back the expiration dates for these "broadcast emails" to be generated because I couldn't find info on this topic. After posting it on phpfreaks, you came up with the solution. Thanks!!!
  2. Hello- I'm looking for help on the above topic. I created a php script to go into a MySQL database, and send a message out to the stored email addresses of individuals meeting certain criteria. The problem I'm encountering is that as the first email is going out fine, then the second address in the database also gets the first one's info, the third both the second and first, and so on. I just want the code to generate 1 email at a time for all users, and I'm stuck on this... I've pasted the code below. <? $connection = @mysql_connect("db.xxxxxx.com", "user_name", "password") or die("Couldn't connect."); $db = mysql_select_db("user_name", $connection) or die("Couldn't select database."); $sql = "SELECT * FROM test_email"; $sql_result = mysql_query($sql,$connection) or die ("Couldn't execute."); while ($row = mysql_fetch_array($sql_result)) { $id = $row["id"]; $email = $row["email"]; $name = $row["name"]; // email below $msg .= "This is an automated email message to User:\t$name.\n\n"; $msg .= "Hello $name, how are you today?\n\n"; $mailheaders = "From: me@mine.com\n"; $mailheaders .= "Reply-To: me@mine.com"; mail($email, "Test Auto Email", $msg, $mailheaders); echo "$id \t $email \t $name <p>"; } ?> Can anyone help? Thanks, Ted
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.