PHPackages                             proprietes-privees/eb-emailbundle - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. proprietes-privees/eb-emailbundle

ActiveSymfony-bundle[Mail &amp; Notifications](/categories/mail)

proprietes-privees/eb-emailbundle
=================================

Dead simple mailer

1.0.0(10y ago)021PHPPHP &gt;=5.4

Since Sep 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/proprietes-privees/EBEmailBundle)[ Packagist](https://packagist.org/packages/proprietes-privees/eb-emailbundle)[ RSS](/packages/proprietes-privees-eb-emailbundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (6)Used By (0)

EBEmailBundle
=============

[](#ebemailbundle)

Minimum configuration
---------------------

[](#minimum-configuration)

Just add your senders (only one is required actually) :

```
eb_email:
    senders:
        -
            name: John DOE
            email: john.doe@gmail.com
    emails: []

```

Configure your emails
---------------------

[](#configure-your-emails)

We have to send a `contact` email with a specific subject and body.

```
eb_email:
    # ...
    emails:
        contact:
            subject: 'New contact !'
            text_template: 'AppBundle:Email:_contact.txt.twig'

```

If you want to send an email with an alternative `text/plain`and `text/html` just use the `html_template` key :

```
eb_email:
    # ...
    emails:
        contact:
            subject: 'New contact !'
            text_template: 'AppBundle:Email:_contact.txt.twig'
            html_template: 'AppBundle:Email:_contact.html.twig'

```

You can use `twig` syntax in your subject :

```
eb_email:
    # ...
    emails:
        contact:
            subject: 'New contact from {{contact.name}} !'
            # ...

```

Send your email
---------------

[](#send-your-email)

```
$this->get('eb_email')->send('contact', 'john.doe@gmail.com');

```

With 2 recipients :

```
$this->get('eb_email')->send('contact', [
    'john.doe1@gmail.com',
    'john.doe2@gmail.com',
]);

```

With a user object implementing a `getUsername` method :

```
$this->get('eb_email')->send('contact', $user);

```

With a templating `message` var :

```
$this->get('eb_email')->send('contact', 'john.doe1@gmail.com', [
    'message' => $message,
]);

```

With an `header` image `` :

```
$this->get('eb_email')->send('contact', 'john.doe1@gmail.com', [
    'message' => $message,
], [
    'header' => '/var/header.png',
]);

```

With a PDF attachment :

```
$this->get('eb_email')->send('contact', 'john.doe1@gmail.com', [
    'message' => $message,
], [], [
    '/var/attachment.pdf',
]);

```

Configure globals, images, attachments and recipients for all mails
-------------------------------------------------------------------

[](#configure-globals-images-attachments-and-recipients-for-all-mails)

Add `app_name` global variable to all emails :

```
eb_email:
    # ...
    globals:
        app_name: BundleDemo

```

Add `header` and `footer` images to all emails (useful for a twig layout) :

```
eb_email:
    # ...
    images:
        header: /var/header.png
        footer: /var/footer.png

```

Add some PDF to all emails :

```
eb_email:
    # ...
    attachments:
        - /var/terms.pdf

```

Add recipients to all emails :

```
eb_email:
    # ...
    recipients:
        -
            name: AppName
            email: contact@appname.com

```

Configure images and attachments for one email
----------------------------------------------

[](#configure-images-and-attachments-for-one-email)

Add the `map` image to the `contact` email :

```
eb_email:
    # ...
    emails:
        contact:
            # ...
            images:
                map: /var/map.png

```

Add one PDF to the `contact` email :

```
eb_email:
    # ...
    emails:
        contact:
            # ...
            attachments:
                - /var/satisfaction.pdf

```

Add one default recipient to the `contact` email :

```
eb_email:
    # ...
    emails:
        contact:
            # ...
            recipients:
                -
                    name: AppName
                    email: contact@appname.com

```

Full configuration
------------------

[](#full-configuration)

```
# Default configuration for "EBEmailBundle"
eb_email:
    senders:              # Required

        # Sender name
        name:                 ~ # Required, Example: John Doe

        # Sender email
        email:                ~ # Required, Example: john.doe@gmail.com

    # Global to add in each template
    globals:              # Example: A parameter

        # Prototype
        name:                 ~

    # Images to attach inline
    images:               # Example: /path/to/file

        # Prototype
        name:                 ~

    # Files to attach
    attachments:          [] # Example: /path/to/file
    recipients:

        # Recipient name
        name:                 ~ # Required, Example: John Doe

        # Recipient email
        email:                ~ # Required, Example: john.doe@gmail.com
    emails:

        # Prototype
        name:

            # Text Template
            text_template:        ~ # Required, Example: AcmeDefautBundle::_text_email.html.twig

            # HTML Template
            html_template:        null # Example: AcmeDefautBundle::_html_email.html.twig

            # Email subject
            subject:              ~ # Required, Example: Welcome {{user.username}} to {{app_name}} !

            # Global to add in this template
            globals:              # Example: A parameter

                # Prototype
                name:                 ~

            # Images to attach inline
            images:               # Example: /path/to/file

                # Prototype
                name:                 ~

            # Files to attach
            attachments:          [] # Example: /path/to/file
            recipients:

                # Recipient name
                name:                 ~ # Required, Example: John Doe

                # Recipient email
                email:                ~ # Required, Example: john.doe@gmail.com

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% 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.

###  Release Activity

Cadence

Every ~133 days

Total

5

Last Release

3710d ago

Major Versions

0.0.4 → 1.0.02016-03-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16955192?v=4)[proprietes-privees](/maintainers/proprietes-privees)[@proprietes-privees](https://github.com/proprietes-privees)

---

Top Contributors

[![emmanuelballery](https://avatars.githubusercontent.com/u/1687685?v=4)](https://github.com/emmanuelballery "emmanuelballery (26 commits)")[![proprietes-privees](https://avatars.githubusercontent.com/u/16955192?v=4)](https://github.com/proprietes-privees "proprietes-privees (1 commits)")

### Embed Badge

![Health badge](/badges/proprietes-privees-eb-emailbundle/health.svg)

```
[![Health](https://phpackages.com/badges/proprietes-privees-eb-emailbundle/health.svg)](https://phpackages.com/packages/proprietes-privees-eb-emailbundle)
```

###  Alternatives

[tss/automailer-bundle

Adds Doctrine spool to Swiftmailer

1144.1k](/packages/tss-automailer-bundle)[trt/swift-css-inliner-bundle

A Swiftmailer plugin that provide css inline feature

1131.4k](/packages/trt-swift-css-inliner-bundle)[hautzi/system-mail-bundle

This Bundle provides a nice abstraction for sending system emails

181.8k](/packages/hautzi-system-mail-bundle)

PHPackages © 2026

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