How can I keep track of mail sent using PHP Swift Mailer?

xHalloweenx

New Member
I am using PHP Swift Mailer to send a bulk mail to a set of users. But I am not able to keep track of sent mail.My code:\[code\]<?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);?>\[/code\]I am using batchSend() method to send mail, which gives me the count of mail that has been sent, but it is not giving me the list of email that has been sent. How can it be possible, is there any plugin or function available? Using Logger plugin will give me the log, but I am unable to read from that.
 
Back
Top