PHPackages                             geekdevs/swift-mailer-extensions - 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. geekdevs/swift-mailer-extensions

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

geekdevs/swift-mailer-extensions
================================

SwiftMailer extensions

2.0.1(6y ago)753.0k↓66.7%2MITPHP

Since May 1Pushed 6y ago3 watchersCompare

[ Source](https://github.com/geekdevs/swift-mailer-extensions)[ Packagist](https://packagist.org/packages/geekdevs/swift-mailer-extensions)[ RSS](/packages/geekdevs-swift-mailer-extensions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

Swift Mailer Extensions
=======================

[](#swift-mailer-extensions)

Overview
--------

[](#overview)

This project is intended to extend capabilities of [SwiftMailer](https://github.com/swiftmailer/swiftmailer).

Note, that master now only supports SwiftMailer v.6 and not compatible with earlier version. If you still need earlier versions, check `v.1` of this package.

Transport
---------

[](#transport)

### File transport

[](#file-transport)

For dev environment it is usually desirable to prevent sending out actual emails and store them into files instead for testing.

**FileTransport** does exactly that - it stores emails into eml format which can then be opened with most email applications (e.g. Outlook or Thunderbird). It accepts event dispatcher as first argument and path to the folder where email files will be stored (you should have write access in it).

**Usage example:**

```
// Initialize file transport
$eventDispatcher = new \Swift_Events_SimpleEventDispatcher()
$transport = new FileTransport($eventDispatcher, 'path/to/folder');

// Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);

// Create a message
$message = Swift_Message::newInstance('Wonderful Subject')
  ->setFrom(array('john@doe.com' => 'John Doe'))
  ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name'))
  ->setBody('Here is the message itself')
  ;

// Send the message
$result = $mailer->send($message);

```

**Connecting to Symfony:**

Define FileTransport as service in `services.yml`:

```
swiftmailer.mailer.transport.file:
    class: Geekdevs\SwiftMailer\Transport\FileTransport
    arguments:
      - "@swiftmailer.mailer.default.transport.eventdispatcher"
      - "%kernel.project_dir%/var/emails"

```

Configure SwiftMailer to understand new transport in `config.yml` file:

```
swiftmailer:
    transport: file

```

Copy plugin
-----------

[](#copy-plugin)

Copy plugin is useful to BCC all outgoing emails to specific address (e.g. if you want to monitor everything what you send out).

**Connecting to Symfony:**

Define CopyPlugin as service in `services.yml`:

```
swiftmailer.mailer.plugin.copy:
    class: Geekdevs\SwiftMailer\Plugin\CopyPlugin
    arguments:
      - "notifications@recipient.com"
    tags:
      - { name: "swiftmailer.default.plugin" }

```

Note the tag `swiftmailer.primary.plugin` where "default" should be the name of your mailer.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~214 days

Total

4

Last Release

2286d ago

Major Versions

1.0.1 → 2.0.02018-06-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c32f742614130f40944df419b067a2d308175dfcc1ea2ced80a37885585aa53?d=identicon)[geekdevs](/maintainers/geekdevs)

---

Top Contributors

[![geekdevs](https://avatars.githubusercontent.com/u/864822?v=4)](https://github.com/geekdevs "geekdevs (9 commits)")[![shabarin](https://avatars.githubusercontent.com/u/3624204?v=4)](https://github.com/shabarin "shabarin (1 commits)")

---

Tags

filemailerextensionswifteml

### Embed Badge

![Health badge](/badges/geekdevs-swift-mailer-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/geekdevs-swift-mailer-extensions/health.svg)](https://phpackages.com/packages/geekdevs-swift-mailer-extensions)
```

###  Alternatives

[nickcv/yii2-mandrill

Mandrill Api Integration for Yii2

29554.2k2](/packages/nickcv-yii2-mandrill)[boundstate/yii2-mailgun

Mailgun integration for the Yii framework

28160.6k](/packages/boundstate-yii2-mailgun)[hafael/azure-mailer-driver

Supercharge your Laravel or Symfony app with Microsoft Azure Communication Services (ACS)! Effortlessly add email, chat, voice, video, and telephony-over-IP for next-level communication. 🚀

14109.2k](/packages/hafael-azure-mailer-driver)[xobotyi/php-mime-type

A comprehensive MIME-types lib for PHP.

317.2k](/packages/xobotyi-php-mime-type)[djagya/yii2-sparkpost

A library provides Yii2 integration with SparkPost mail service

1816.3k](/packages/djagya-yii2-sparkpost)

PHPackages © 2026

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