Helo coderz pls help me with the code to send mail to all my users at once... Email are stored in database. Thanx
Help, send multiple mail.
Collapse
X
-
Try this just check table names.
PHP Code:$emails = array(); $select = mysql_query('SELECT `email` FROM `users`'); while ($sel = mysql_fetch_array($select)) { $emails[] = $sel[0]; } foreach ($emails as $email) { $subject = 'Subject...'; $message = 'Message...'; $header = 'MIME-Version: 1.0'.PHP_EOL; $header .= 'Content-type: text/html; charset=utf-8'.PHP_EOL; $header .= 'From: mailing@mail.com'; @mail($email, $subject, $message, $header); echo 'Sent!'; }<!DOCTYPE html PUBLIC "-//WAPFORUM.RS
Comment
Comment