j-s 0 Report post Posted September 27, 2004 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. Share this post Link to post Share on other sites
Magic-Node 0 Report post Posted September 29, 2004 $sql = mysql_query("SELECT email FROM xxx");[br] [/br]while($sql = mysql_fetch_array($sql))[br]{[/br] mail($sql['email'], $subject, $message);} Share this post Link to post Share on other sites
j-s 0 Report post Posted September 29, 2004 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 ! Share this post Link to post Share on other sites
odomike 0 Report post Posted October 1, 2004 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. Share this post Link to post Share on other sites
virrey 0 Report post Posted October 8, 2004 if you want more complex examples or more examples emailsyou can use this tool phpmailer.sf.netyou can create html mails, add files, Share this post Link to post Share on other sites