Current location: Hot Scripts Forums » Programming Languages » PHP » phpbb and mailing list


phpbb and mailing list

Reply
  #1 (permalink)  
Old 10-18-04, 12:37 PM
lppa2004 lppa2004 is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
phpbb and mailing list

hi got a question... how would i create a mailing list manager that would read from my phpbb users table all of the email addresses and then one by one send individual emails to the users.. i need the ability to send formatted html and formatted text (unlike current mass mail function in phpbb)

could someone post me some code to do this, id greatly appreciate it
Reply With Quote
  #2 (permalink)  
Old 10-19-04, 04:39 AM
lool49 lool49 is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Hi create a form that sends the info to this code, that should do it

$sql = "select $email from $your_database";
$res = mysql_query($sql) or die("Couldn't get addresses.");

$headers = "From: $yor_name<$your_email>\n";
//ADD MORE HEADERS HERE HTML ETC...

while ($row = mysql_fetch_array($res)) {
$email_addr = $row[0];
$fullmessage = $_POST[message];
mail("$email_addr", "$_POST[subject]", $fullmessage, $headers);
Reply With Quote
Reply

Bookmarks


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 04:36 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.