Download the PHP package whiteoctober/swiftmailerdbbundle without Composer
On this page you can find all versions of the php package whiteoctober/swiftmailerdbbundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download whiteoctober/swiftmailerdbbundle
More information about whiteoctober/swiftmailerdbbundle
Files in whiteoctober/swiftmailerdbbundle
Package swiftmailerdbbundle
Short Description Database spooling for SwiftMailer
License MIT
Informations about the package swiftmailerdbbundle
This project is looking for maintainers - details here.
SwiftMailerDBBundle
This project was originally at https://github.com/whiteoctober/WhiteOctoberSwiftMailerDBBundle
This bundle faciliates using a database to spool messages to with SwiftMailer and Symfony2.
At present, it only works with the Doctrine EntityManager and entities managed with this.
Installation and configuration
1. Install via Composer
2. Add the bundle to your application's kernel
3. Configure the white_october_swift_mailer_db
in config.yml
Read below about how to construct this entity.
4. Tell SwiftMailer to use the database spooler
That's it for bundle installation and configuration.
Mail entity
You will need to create an entity that can be persisted and that extends from the
EmailInterface
interface in the bundle. At the moment, the bundle expects a
property to be available on your entity called 'status', since this field is queried.
Once you have your entity all set up, use the full namespaced path in your config.yml
configuration as detailed above.
Optional: keeping sent messages in the database
By default, messages which were succesfully sent will be deleted from the database. It is possible to configure the bundle to keep those messages in your config.yml:
Optional: using separate entity manager for emails
When a message is sent with configured database spool $em->flush
is called on default entity manager. This may
cause side effects, so in order to flush only Email entity, put it in a separate bundle and configure separate
entity manager for that bundle. For example:
Contributing
We welcome contributions to this project, including pull requests and issues (and discussions on existing issues).
If you'd like to contribute code but aren't sure what, the issues list is a good place to start. If you're a first-time code contributor, you may find Github's guide to forking projects helpful.
All contributors (whether contributing code, involved in issue discussions, or involved in any other way) must abide by our code of conduct.