|
|
|
|
![]() ![]() |
Sep 27 2004, 03:19 PM
Post
#1
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 28 Joined: 25-September 04 Member No.: 1,268 |
Hi !
I'd need to create a PHP script that would allow me to send an e-mail to many persons at the same time (newsletter). All the e-mail adresses are ine a MySQL database. So how do I do with the function mail() to send many e-mails ? Do I use loops or maybe an array ? But how to put the MySQL request in an array ? Please help me. Thanks in advance. |
|
|
|
Sep 29 2004, 10:55 AM
Post
#2
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 26 Joined: 14-September 04 Member No.: 1,116 |
CODE $sql = mysql_query("SELECT email FROM xxx");
while($sql = mysql_fetch_array($sql)) { mail($sql['email'], $subject, $message); } |
|
|
|
Sep 29 2004, 12:06 PM
Post
#3
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 28 Joined: 25-September 04 Member No.: 1,268 |
Only that ? Wah... it was a simple loop ? I thought I should create an array, but taht was to complex for what I know in PHP... Thank you man !
|
|
|
|
Oct 1 2004, 11:34 PM
Post
#4
|
|
|
Core2Q-QX6800 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 1,093 Joined: 3-August 04 From: Nigeria Member No.: 569 |
i must say that I am not so good in php scripting. I am very sorry that I cannot be of much help to you m8.
|
|
|
|
Oct 8 2004, 07:06 PM
Post
#5
|
|
|
Newbie ![]() Group: Members Posts: 9 Joined: 8-October 04 Member No.: 1,524 |
if you want more complex examples or more examples emails
you can use this tool phpmailer.sf.net you can create html mails, add files, |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th September 2008 - 07:17 AM |