This is an old question, but since it appeared in my Google search, I will answer it with what I understand.
YES! Swiftmailer has the ability to write to reel instead of sending right away. The implementation is pretty simple:
$spool = new Swift_FileSpool('/where/you/want/your/spool'); $transport = Swift_SpoolTransport::newInstance($spool); $mailer = Swift_Mailer::newInstance($transport);
This says that swiftmailer writes messages to disk and then sends them. Then, using a cron job or other trigger, send messages using something like:
$spool = new Swift_FileSpool('/where/you/put/your/spool'); $spool_transport = Swift_SpoolTransport::newInstance($spool); // Create the smtp transport. $smtp_transport = Swift_SmtpTransport::newInstance('your.smtp.host', 25); // Get the messages from the spool $spool = $spool_transport->getSpool(); // Send the messages via the real transport. $sent = $spool->flushQueue($smtp_transport);
source share