feature #1131 Flush spool queue for console terminate as well (dirkluijk)
This PR was squashed before being merged into the 2.0.x-dev branch (closes #1131). Discussion ---------- Flush spool queue for console terminate as well This allows to flush Swift messages automatically inside a Silex console application. It basically does the same as the ``EmailSenderListener`` in Symfony's SwiftMailerBundle. (see https://github.com/symfony/SwiftmailerBundle/commit/4b90392463296acc9ccf8f10649d7ac4937ae0f3). ```php use Symfony\Component\Console\Application; $app = require __DIR__.'/app.php'; $console = new Application('My Silex Application', 'n/a'); $console->setDispatcher($app['dispatcher']); // .. register commands that send emails $console->run(); ``` Commits ------- 8ecc11e6 Flush spool queue for console terminate as well
Showing
Please register or sign in to comment