Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: send e-mail all user

Parašė sniuff· 2009 Vas. 14 15:02:29
#2

<?php
require_once "maincore.php";
$result = dbquery("SELECT * FROM `".$db_prefix."users`");
while ($data = dbrray($result)) {
$Name = "Da Duder"; //senders name
$email = "email@adress.com"; //senders e-mail adress
$recipient = $data['user_email]; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
mail($recipient, $subject, $mail_body, $header); //mail command :)
}
?>