我想将我的网站时事通讯成员自动订阅到我的 Google 群组。
我尝试通过 PHP Mail 功能从用户电子邮件向 mygroupname+subscribe@googlegroups.com 发送主题和正文“订阅”的电子邮件。但在我的小组中没有任何结果和订阅请求。
$phpMailSender = new PHPMailer();
$phpMailSender->CharSet = "UTF-8";
foreach($users as $user) {
$phpMailSender->ClearAddresses();
$phpMailSender->From = $user['email'];
$phpMailSender->FromName = $user['email'];
$phpMailSender->AddReplyTo($user['email']);
$phpMailSender->addAddress('mygroupname+subscribe@googlegroups.com');
$phpMailSender->Subject = 'subscribe';
$phpMailSender->Body = 'subscribe';
$result = $phpMailSender->send();
if($result)
echo "Subscription email Sent for user# " . $user['email'] . "\n";
else
echo "Subscription email failed for user# " . $user['email'] . "\n";
ob_flush();
flush();
}
谁能帮我!