phpmailer多邮件发送
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = "[email protected]";
$mail->FromName = "List manager";
$mail->Host = "smtp1.site.com;smtp2.site.com";
$mail->Mailer = "smtp";
@MYSQL_CONNECT("localhost","root","password");
@mysql_select_db("my_company");
$query = "SELECT full_name, email, photo FROM employee WHERE id=$id";
$result = @MYSQL_QUERY($query);
while ($row = mysql_fetch_array ($result)) {
// HTML body
$body = "Hello " . $row["full_name"] . ",
";
$body .= "Your personal photograph to this message.
";
$body .= "Sincerely,
";
$body .= "PHPMailer List manager";
// Plain text body (for mail clients that cannot read HTML)
$text_body = "Hello " . $row["full_name"] . ", ";
$text_body .= "Your personal photograph to this message. ";
$text_body .= "Sincerely, ";
$text_body .= "PHPMailer List manager";
$mail->Body = $body;
$mail->AltBody = $text_body;
$mail->AddAddress($row["email"], $row["full_name"]);
$mail->AddStringAttachment($row["photo"], "YourPhoto.jpg");
if(!$mail->Send())
echo "There has been a mail error sending to " . $row["email"] . "
";
// Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();
}
樱花校园模拟器4399中文版
樱花校园模拟器4399中文版,十分奇趣好玩的3d校园冒险模拟
我的暑假秘密回忆繁星新春版
我的暑假秘密回忆繁星新春版是一款少女模拟养成类休闲游戏。这款
樱花校园模拟器国际版
樱花校园模拟器国际版,一个超级自由超级好玩的自由恋爱模拟的游
饥荒海难九游版
饥荒海难九游版,带你去真实的海岛上感受一下什么才是真正的孤岛
盖瑞模组体验版最新版
盖瑞模组体验版是玩法非常丰富多元化的沙盒建造游戏,玩家可以在