PHPackages                             uam/postmark-swiftmailer-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. uam/postmark-swiftmailer-bundle

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

uam/postmark-swiftmailer-bundle
===============================

Symfony bundle to provide a Postmark SwiftMailer service

0.3.1(11y ago)22.9k2[1 issues](https://github.com/opichon/UAMPostmarkSwiftMailerBundle/issues)MITPHPPHP &gt;=5.3.3

Since May 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/opichon/UAMPostmarkSwiftMailerBundle)[ Packagist](https://packagist.org/packages/uam/postmark-swiftmailer-bundle)[ Docs](http://gitweb.united-asian.com)[ RSS](/packages/uam-postmark-swiftmailer-bundle/feed)WikiDiscussions master Synced today

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

UAMPostmarkSwiftmailerBundle
============================

[](#uampostmarkswiftmailerbundle)

A Symfony2 bundle that provides a SwiftMailer Transport implementation based on Postmark's API.

While a Symfony app by no means requires you to use SwiftMailer for sending emails, there are many benefits to doing so: log of emails sent, ability to redirect to a single delivery address during development, etc.

This bundle allows you to use the Postmark API as a SwiftMailer transport in your Symfony app. This provides you with the benefits of both SwiftMailer and of the Postmark service.

This bundle is in its early stages of development, and can hardly be viewed as production-ready. Usage in production is at your peril.

Requirements
------------

[](#requirements)

You need an active account at [https://postmarkapp.com/](https://postmarkapp.com) and a Postmark API key.

This bundle relies on the [MZPostmarkBundle](https://packagist.org/packages/mlpz/postmark-bundle) and will include it automatically.

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

[](#installation)

Add package to your project's `composer.json`:

```
"require": {
	"uam/postmark-swiftmailer-bundle": "dev-master",
	…
}

```

Register this bundle as well as the MZPostmarkBundle in `AppKernel.php`:

```
public function registerBundles()
{
	bundles = (
		// …
		new MZ\PostmarkBundle\MZPostmarkBundle(),
		new UAM\Bundle\PostmarkSwiftMailerBundle\UAMPostmarkSwiftMailerBundle(),
	);

	return bundles();
}

```

Configuration
-------------

[](#configuration)

Configure the MZPostmarkBundle as per that bundle's documentation:

```
# app/config/config.php

mz_postmark:
    api_key:    %postmark_api_key%
    from_email: %postmark_from_email%
    from_name:  %postmark_from_name%
    use_ssl:    %postmark_use_ssl%
    timeout:    %postmark_timeout%

```

Update your SwiftMailer configuration to use the `uam_postmark` SwiftMailer transport provided by this bundle.

```
# app/config.php
swiftmailer:
	transport: uam_postmark

```

There is no configuration specific to this bundle.

Usage
-----

[](#usage)

This bundle creates a service aliased `uam_postmark` which implements a SwiftMailer transport based on the [Postmark](https://postmarkapp.com/) API.

Create your SwiftMailer messages as usual. When sent, the messages will be routed through the `uam_postmark` transport to the Postmark servers.

SwitfMailer plugins
-------------------

[](#switfmailer-plugins)

The UAMPostmarkTransport should in theory be able to support all swiftmailer plugins. However, so far only the Redirecting plugin has been tested to some extent.

### Redirecting

[](#redirecting)

Edit your swiftmailer configuration as per the symfony SwiftMailerBundle documentation:

```
# app/config.php
swiftmailer:
	delivery_address: test@example.com

```

Known issues
------------

[](#known-issues)

### HTML message content shows up as raw text

[](#html-message-content-shows-up-as-raw-text)

Make sure that the HTML body in your emails are set as a MIME part:

```
$message
    ->addPart($htmlBody, 'text/html');

```

### Email count

[](#email-count)

The `Swift_Transport#send()` method returns the count of messages sent.

This bundle's implementation will return the number of emails sent to recipients included in the 'To' header. Emails sent to 'Cc' and 'Bcc' recipients will not be included in the email count returned.

The reason for this is that the Postmark API, while supporting Cc and Bcc recipients, does not seem to include any data about them in its response to a request to send a message.

### Failed recipients

[](#failed-recipients)

The `Swift_Transport#send()` method's second parameter is designed to be passed a variable which collects the email addresses of failed recipients.

This is not supported by this bundle's implementation of the Swift\_Transport interface. By design, this implementation will make a single call to the Postmark API for all the recipients (To, Cc, and Bcc included included in a single call, as opposed to a call per recipient). This single call will fail if one of the email addresses is invalid.

### Redirecting custom headers are lost

[](#redirecting-custom-headers-are-lost)

SwiftMailer's Redirecting plugin adds custom headers to your message to reflect the original recipients ('X-Swift-To', 'X-Swift-Cc', 'X-Swift-Bcc'). These headers are not recognized by the Postmark API and are not retained in the actual message sent via Postmark.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~52 days

Recently: every ~117 days

Total

10

Last Release

4308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61710b3e2bdf8cc378cb14f7e9c3d4fa753738373565270820a7be21c89f6d69?d=identicon)[opichon](/maintainers/opichon)

---

Top Contributors

[![opichon](https://avatars.githubusercontent.com/u/203745?v=4)](https://github.com/opichon "opichon (34 commits)")

---

Tags

symfonybundleswiftmailerpostmarkapp

### Embed Badge

![Health badge](/badges/uam-postmark-swiftmailer-bundle/health.svg)

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

###  Alternatives

[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k3](/packages/web-auth-webauthn-framework)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

65474.5k9](/packages/web-auth-webauthn-symfony-bundle)[stephpy/timeline-bundle

Symfony2 bundle to make timeline

191369.5k4](/packages/stephpy-timeline-bundle)[mcfedr/awspushbundle

A set of services to simplify using Aws to send push notifications

40382.7k1](/packages/mcfedr-awspushbundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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