You might want to take a look at the SwiftMailer Logger Plugin which will allow you log all the interactions between your client and the SMTP server.
There is two types of loggers available:
- The
ArrayLogger
- (Keeps a collection of log messages inside an array. The array content can be cleared or dumped out to the screen) - The
EchoLogger
(Prints output to the screen in realtime. Handy for very rudimentary debug output)
You can register the plugin using either:
$logger = new Swift_Plugins_Loggers_ArrayLogger();
$swift->registerPlugin(new Swift_Plugins_LoggerPlugin($logger));
or
$logger = new Swift_Plugins_Loggers_EchoLogger();
$swift->registerPlugin(new Swift_Plugins_LoggerPlugin($logger));
Just make sure you have the plugin installed and that your class autoloader can access the required class on demand.
Refer to the documentation for further details.