我创建了一个每日交易网站,现在我想运行邮件时事通讯。一切正常,但现在我想处理退回电子邮件(仅限非活动邮件)。
有人可以给我一个示例 cron 脚本,它可以打开退回电子邮件箱,只检测非活动电子邮件并截断收件箱吗?
This is my example script for the newsletter:
$result = mysql_query("SELECT email FROM members");
while($row = mysql_fetch_array($result)) {
$email = $row["email"];
$subject = 'Subject of Newsletter';
$headers = "From: noreply@***.com\r\n";
$headers = "Return-Path: bounce@***.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
$content = 'HTML Newsletter';
mail($email, $subject, $content, $headers);
}