PHPackages                             dugandzic/swiftmailer-mailgun-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. dugandzic/swiftmailer-mailgun-bundle

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

dugandzic/swiftmailer-mailgun-bundle
====================================

Swiftmailer Mailgun bundle

0.2.1(10y ago)0391GPL-2.0+PHPPHP &gt;=5.3

Since Aug 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/WorldWarIII/swiftmailer-mailgun-bundle)[ Packagist](https://packagist.org/packages/dugandzic/swiftmailer-mailgun-bundle)[ Docs](https://github.com/tehplague/swiftmailer-mailgun-bundle)[ RSS](/packages/dugandzic-swiftmailer-mailgun-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

Swiftmailer Mailgun bundle
==========================

[](#swiftmailer-mailgun-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/2172ec18ad336cbb812ac720ea41d8a86ceda4d240f789830ded189196b9970c/68747470733a2f2f706f7365722e707567782e6f72672f6373706f6f2f73776966746d61696c65722d6d61696c67756e2d62756e646c652f762f737461626c65)](https://packagist.org/packages/cspoo/swiftmailer-mailgun-bundle)[![codecov.io](https://camo.githubusercontent.com/0d99fc68874efaa042b8801a9bba29865620f649f856f9cead834e5e1b02e794/68747470733a2f2f636f6465636f762e696f2f6769746875622f746568706c616775652f73776966746d61696c65722d6d61696c67756e2d62756e646c652f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/tehplague/swiftmailer-mailgun-bundle?branch=master)[![Total Downloads](https://camo.githubusercontent.com/eaa2fe92ff875bc2c078424c846549326d1dfcefcf807c47f8a54b4cf99d87a2/68747470733a2f2f706f7365722e707567782e6f72672f6373706f6f2f73776966746d61696c65722d6d61696c67756e2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/cspoo/swiftmailer-mailgun-bundle)[![Monthly Downloads](https://camo.githubusercontent.com/9a87464af44b7f4d5142c3b47afbe00a51f52860c473c0f54b5d0e89ffafd9bf/68747470733a2f2f706f7365722e707567782e6f72672f6373706f6f2f73776966746d61696c65722d6d61696c67756e2d62756e646c652f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/cspoo/swiftmailer-mailgun-bundle)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

This bundle adds an extra transport to the swiftmailer service that uses the mailgun http interface for sending messages.

Installation
------------

[](#installation)

```
composer require dugandzic/swiftmailer-mailgun-bundle
```

Also add to your AppKernel:

```
new cspoo\Swiftmailer\MailgunBundle\cspooSwiftmailerMailgunBundle(),
```

Configure your application with the credentials you find on the [domain overview](https://mailgun.com/app/domains) on the Mailgun.com dashboard.

```
// app/config/config.yml:
cspoo_swiftmailer_mailgun:
    key: "key-xxxxxxxxxx"
    domain: "mydomain.com"

# Swiftmailer Configuration
swiftmailer:
    transport: "mailgun"
    spool:     { type: memory } # This will start sending emails on kernel.terminate event
```

Note that the swiftmailer configuration is the same as the standard one - you just change the mailer\_transport parameter.

Usage
-----

[](#usage)

First craft a message:

```
$message = \Swift_Message::newInstance()
        ->setSubject('Hello Email')
        ->setFrom('send@example.com')
        ->setTo('recipient@example.com')
        ->setBody(
            $this->renderView(
                'HelloBundle:Hello:email.txt.twig',
                array('name' => $name)
            )
        )
    ;
```

Then send it as you normally would with the `mailer` service. Your configuration ensures that you will be using the Mailgun transport.

```
$this->container->get('mailer')->send($message);
```

Todo:

- Add mailgun as a separate transport to the normal Swiftmailer service
- Tests

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.6% 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 ~125 days

Total

5

Last Release

3825d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.3.2

0.2.0PHP &gt;=5.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64238619?v=4)[WorldWarIII](/maintainers/WorldWarIII)[@worldwarIII](https://github.com/worldwarIII)

---

Top Contributors

[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (20 commits)")[![tehplague](https://avatars.githubusercontent.com/u/1062568?v=4)](https://github.com/tehplague "tehplague (6 commits)")[![ivandugandzic86-blip](https://avatars.githubusercontent.com/u/259709794?v=4)](https://github.com/ivandugandzic86-blip "ivandugandzic86-blip (4 commits)")[![drmjo](https://avatars.githubusercontent.com/u/1946791?v=4)](https://github.com/drmjo "drmjo (1 commits)")[![mattattui](https://avatars.githubusercontent.com/u/93214?v=4)](https://github.com/mattattui "mattattui (1 commits)")[![rcwsr](https://avatars.githubusercontent.com/u/1541207?v=4)](https://github.com/rcwsr "rcwsr (1 commits)")

---

Tags

mailgune-mailswiftmailer

### Embed Badge

![Health badge](/badges/dugandzic-swiftmailer-mailgun-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dugandzic-swiftmailer-mailgun-bundle/health.svg)](https://phpackages.com/packages/dugandzic-swiftmailer-mailgun-bundle)
```

###  Alternatives

[cspoo/swiftmailer-mailgun-bundle

Swiftmailer Mailgun bundle

1041.1M](/packages/cspoo-swiftmailer-mailgun-bundle)[mailjet/mailjet-swiftmailer

A SwiftMailer transport implementation for Mailjet

261.3M9](/packages/mailjet-mailjet-swiftmailer)[boundstate/yii2-mailgun

Mailgun integration for the Yii framework

28165.8k](/packages/boundstate-yii2-mailgun)[aimeos/ai-swiftmailer

SwiftMailer adapter for Aimeos web shops and e-commerce solutions

19168.5k5](/packages/aimeos-ai-swiftmailer)[yarcode/yii2-mailgun-mailer

Mailgun mailer implementation for Yii2

1576.5k](/packages/yarcode-yii2-mailgun-mailer)

PHPackages © 2026

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