All Projects → sampart → WhiteOctoberSwiftMailerDBBundle

sampart / WhiteOctoberSwiftMailerDBBundle

Licence: other
A bundle to facilitate SwiftMailer spooling messages to a database

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to WhiteOctoberSwiftMailerDBBundle

api-platform-messenger
Uses API Platform to exposes Commands & Queries dispatched to your Symfony Messenger bus
Stars: ✭ 31 (+0%)
Mutual labels:  symfony-bundle
PRRecaptchaBundle
Recaptcha v3 bundle for Symfony
Stars: ✭ 14 (-54.84%)
Mutual labels:  symfony-bundle
MultipartUploadBundle
Symfony multipart/related/mixed/alternative content type handler (rfc1341).
Stars: ✭ 21 (-32.26%)
Mutual labels:  symfony-bundle
LiipSearchBundle
[DEPRECATED] Google XML API for searching is discontinued
Stars: ✭ 35 (+12.9%)
Mutual labels:  symfony-bundle
stampie-bundle
stampie.github.io/
Stars: ✭ 26 (-16.13%)
Mutual labels:  symfony-bundle
jsonrpc-bundle
JSON-RPC server for Symfony: exposes services registered in the service container as JSON-RPC-webservices
Stars: ✭ 31 (+0%)
Mutual labels:  symfony-bundle
gulp-rev-versions-bundle
A bundle that allows symfony to get the version of assets versioned with gulp-rev
Stars: ✭ 13 (-58.06%)
Mutual labels:  symfony-bundle
symbok-bundle
Symfony annotations bundle
Stars: ✭ 50 (+61.29%)
Mutual labels:  symfony-bundle
SonataDoctrineMongoDBAdminBundle
Symfony Sonata / Integrate Doctrine MongoDB ODM into the SonataAdminBundle
Stars: ✭ 64 (+106.45%)
Mutual labels:  symfony-bundle
hashids-bundle
Integrates hashids/hashids in a Symfony project
Stars: ✭ 43 (+38.71%)
Mutual labels:  symfony-bundle
SlackBundle
SlackBundle for Symfony2 with Guzzle-Integration
Stars: ✭ 39 (+25.81%)
Mutual labels:  symfony-bundle
SonataDashboardBundle
[Abandoned] Provides a Dashboard management through container and block services
Stars: ✭ 17 (-45.16%)
Mutual labels:  symfony-bundle
EasyAdminPlusBundle
EasyAdminPlusBundle is a Symfony 4 wrapper for the amazing EasyCorp/EasyAdminBundle
Stars: ✭ 39 (+25.81%)
Mutual labels:  symfony-bundle
SensioBuzzBundle
No description or website provided.
Stars: ✭ 89 (+187.1%)
Mutual labels:  symfony-bundle
connect-bundle
No description or website provided.
Stars: ✭ 35 (+12.9%)
Mutual labels:  symfony-bundle
SonataTimelineBundle
[Abandoned] Integrates SpyTimelineBundle into Sonata
Stars: ✭ 24 (-22.58%)
Mutual labels:  symfony-bundle
LiipImagineSerializationBundle
Provides integration between LiipImagineBundle and JMSSerializerBundle
Stars: ✭ 24 (-22.58%)
Mutual labels:  symfony-bundle
RapidFormBundle
Create Symfony forms at record speed using PHP 8 attributes!
Stars: ✭ 33 (+6.45%)
Mutual labels:  symfony-bundle
NucleosDompdfBundle
📜 This bundle provides a wrapper for using dompdf inside symfony.
Stars: ✭ 29 (-6.45%)
Mutual labels:  symfony-bundle
hashed-asset-bundle
Apply an asset version based on a hash of the asset for symfony/asset
Stars: ✭ 24 (-22.58%)
Mutual labels:  symfony-bundle

This project is looking for maintainers - details here.

SwiftMailerDBBundle

This project was originally at https://github.com/whiteoctober/WhiteOctoberSwiftMailerDBBundle

Latest Stable Version Total Downloads Monthly Downloads License

SwiftMailer

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

$ composer require "whiteoctober/swiftmailerdbbundle:^1.0"

2. Add the bundle to your application's kernel

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new WhiteOctober\SwiftMailerDBBundle\WhiteOctoberSwiftMailerDBBundle(),
        // ...
    );
}

3. Configure the white_october_swift_mailer_db in config.yml

white_october_swift_mailer_db:
    entity_class: AppBundle\Entity\Email

Read below about how to construct this entity.

4. Tell SwiftMailer to use the database spooler

swiftmailer:
    spool:
        type: db

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:

white_october_swift_mailer_db:
    keep_sent_messages: true

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:

white_october_swift_mailer_db:
    entity_class: MailBundle\Entity\Email

doctrine:
    orm:
        entity_managers:
            default:
                connection: default
                auto_mapping: true
            mail:
                connection: default
                mappings:
                    MailBundle: ~

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].