PHPackages                             dextervip/database-swiftmalier-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. dextervip/database-swiftmalier-bundle

ActiveLibrary[Database &amp; ORM](/categories/database)

dextervip/database-swiftmalier-bundle
=====================================

Database Spool Bundle for SwiftMailer and Symfony 2

920.5k5[3 issues](https://github.com/dextervip/DatabaseSwiftMailerBundle/issues)PHP

Since Mar 20Pushed 9y ago3 watchersCompare

[ Source](https://github.com/dextervip/DatabaseSwiftMailerBundle)[ Packagist](https://packagist.org/packages/dextervip/database-swiftmalier-bundle)[ RSS](/packages/dextervip-database-swiftmalier-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

DatabaseSwiftMailerBundle
=========================

[](#databaseswiftmailerbundle)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7f405788e6c9c27c68acbccf94f23111c7d7b4cfbc95c80b30f300252f1e395c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6465787465727669702f446174616261736553776966744d61696c657242756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dextervip/DatabaseSwiftMailerBundle/?branch=master)

Introduction
------------

[](#introduction)

This bundle add a database driven swiftmailer spool to your symfony 2 project. It requires Symfony 2.4+ and usage of entities with Doctrine ORM.

### Features

[](#features)

- Auto Retrying: set a maximum number of retries that spool will try to send in case of failure
- Dashboard to list the email spool and perform some actions
- Retry sending an email
- Cancelling an email sending
- Resending an email

Installing
----------

[](#installing)

### Add composer

[](#add-composer)

Add the dependency to your composer.json

```
    "require": {
        ...
	    "dextervip/database-swiftmalier-bundle" : "dev-master"
	}
```

### Add bundle class in kernel

[](#add-bundle-class-in-kernel)

Register the bundle class and its dependencies in your AppKernel.php

```
    public function registerBundles()
    {
        $bundles = array(
        ...
        new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
        new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
        new Citrax\Bundle\DatabaseSwiftMailerBundle\CitraxDatabaseSwiftMailerBundle(),
        ...
        );
    }
```

### Add routes

[](#add-routes)

If you want to have a spool dashboard, add the following routes.

```
citrax_database_swift_mailer:
    resource: "@CitraxDatabaseSwiftMailerBundle/Controller/"
    type:     annotation
    prefix:   /
```

Configuring
-----------

[](#configuring)

### Update database

[](#update-database)

Update your database schema to create the necessary entities.

```
$ php app/console doctrine:schema:update --force
```

### Update swiftmailer config

[](#update-swiftmailer-config)

Change your spool type from memory to db in your config.yml

```
    spool:     { type: db }
```

### Overriding default templates

[](#overriding-default-templates)

You may want to override the default template to have the look and feel of your application. You can do it by creating a new bundle and defining its parent as CitraxDatabaseSwiftMailerBundle.

1. Create a new empty bundle E.g. EmailBundle
2. Edit its bundle class and add a getParent() method returning 'CitraxDatabaseSwiftMailerBundle'

```
class EmailBundle extends Bundle
{
    public function getParent()
    {
        return 'CitraxDatabaseSwiftMailerBundle';
    }
}
```

3. Create a twig template inside your new bundle in Resources/views/layout.html.twig and edit it to fit into your application layout. See the example below:

```
{% extends 'AppBundle::base.html.twig' %}

{% block title %}Email Spool{% endblock %}

{% block body %}
    {% block database_swiftmailer_content %}{% endblock %}
{% endblock %}
```

4. All done!

### Extra config

[](#extra-config)

??

Running
-------

[](#running)

To send emails that are in the database spool, just run the following command:

```
$ php app/console swiftmailer:spool:send
```

You may add a cron job entry to run it periodically.

You can check the spool status with all emails at http://your\_project\_url/email-spool

To Do's
-------

[](#to-dos)

- Filter emails
- Insert error message once it reaches the maximum of retries
- Last run date
- Count total sent

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ffb921fa50b48a6a82c442157d45073a8f204caacf48088b5ffb4a77df68c8e6?d=identicon)[dextervip](/maintainers/dextervip)

---

Top Contributors

[![dextervip](https://avatars.githubusercontent.com/u/964836?v=4)](https://github.com/dextervip "dextervip (16 commits)")[![redaLaanait](https://avatars.githubusercontent.com/u/7085815?v=4)](https://github.com/redaLaanait "redaLaanait (2 commits)")

### Embed Badge

![Health badge](/badges/dextervip-database-swiftmalier-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dextervip-database-swiftmalier-bundle/health.svg)](https://phpackages.com/packages/dextervip-database-swiftmalier-bundle)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
