jarjobs / swiftmailerdatabasebundle
Database spooling for SwiftMailer
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 2 748
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 5
Type:symfony-bundle
Requires
- php: >=7.1
- doctrine/orm: ^2.5.11
- symfony/config: ^4.0
- symfony/dependency-injection: ^4.0
- symfony/doctrine-bridge: ^4.2
- symfony/swiftmailer-bundle: ^3.1
This package is auto-updated.
Last update: 2021-03-28 03:10:41 UTC
README
This bundle facilitates using a database to spool messages to with SwiftMailer and Symfony 4.
At this moment, it only works with the Doctrine EntityManager and entities managed with this.
Installation and configuration
1. Install via Composer
composer require "jarjobs/swiftmailerdatabasebundle:^1.0"
2. Configure the swiftmailer_database
in framework.yml
swiftmailer_database: entity_class: App\Entity\Email
Below some about implementation of Email
entity.
3. Tell SwiftMailer to use the database spooler
swiftmailer: spool: type: db
Email entity
You will need to implement EmailInterface
from this bundle in entity that be persisted.
Once you have your entity all set up, use the full namespaced path in your framework.yml
configuration as detailed above.
Optional: keeping sent messages in the database
By default, messages which were successfully sent will be deleted from the db. It's possible to configure the bundle to keep those messages in your framework.yml
.
swiftmailer_database: keep_sent_messages: true