PHP Swift Mailer を使用して、一連のユーザーに一括メールを送信しています。しかし、送信されたメールを追跡することはできません。
私のコード:
<?php
require_once("includes/database.class.php");
require_once("lib/swift_required.php");
$con=DBClass::getConnection();
$db=DBClass::getDatabase($con);
$login_id="myloginname";
$password="mypassword";
$to_mail; //list of people
//Create the Transport
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, "ssl")
->setUsername($login_id)
->setPassword($password);
//Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);
//Rate limit to 25 emails per-minute
$mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin(
25, Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE
));
//Create a message
$message = Swift_Message::newInstance($subject)
->setFrom($login_id)
->setTo($to_mail)
->setBody($body,
'text/html'
);
$numSent=$mailer->batchSend($message);
?>
batchSend() メソッドを使用してメールを送信すると、送信されたメールの数が表示されますが、送信されたメールのリストは表示されません。プラグインや機能はありますか?
Logger プラグインを使用するとログが表示されますが、そこから読み取ることができません。