Skip to content

Conversation

@dol
Copy link

@dol dol commented Apr 6, 2017

When starting with a default symfony project the swiftmailer is set-upped to use spool for sending out mails.
https://github.com/symfony/symfony-standard/blob/7a885f1dcd2f5191f19470866aca9a472770ebcf/app/config/config.yml#L69

The spool is only flushed sent out on the kernel terminate event. When using this bundle the kernel terminate event won't be triggered. This will block the emails in memory and they are never released. A Ctrl+C will interrupt the worker but not flushing the email either.

By adding a custom EventListener to the bundle this issue could be fixed.
An other approach would be creating a specialized SwiftMailerGearmanBundle that deals with GearmanBundle events and flushes the SwiftMailer spool. But this is kind of an overload.

@dol dol force-pushed the feature/flushSwiftmailerSpoolOnCompletion branch from 6e91f14 to 7fbb6e1 Compare April 7, 2017 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant