PHPackages                             francescogabbrielli/swift-aws-ses-transport - 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. francescogabbrielli/swift-aws-ses-transport

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

francescogabbrielli/swift-aws-ses-transport
===========================================

Add AWS SES support via PHP Api v2 and v3 to Swiftmailer

256PHP

Since Jan 3Pushed 6y agoCompare

[ Source](https://github.com/francescogabbrielli/SwiftAwsSesTransport)[ Packagist](https://packagist.org/packages/francescogabbrielli/swift-aws-ses-transport)[ RSS](/packages/francescogabbrielli-swift-aws-ses-transport/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

SwiftAwsSesTransport
====================

[](#swiftawssestransport)

What is it?
-----------

[](#what-is-it)

It's a transport for use with Swiftmailer to send mail over AWS SES. An updated version of the transport by jmhobbs using AWS SesClient v2/v3. Currently still in a development state. Collaborations/ideas welcome.

Where do I put it?
------------------

[](#where-do-i-put-it)

The best way to use it is through [composer](https://getcomposer.org/).

```
composer require francescogabbrielli/swift-aws-ses-transport
```

Which will bring in Swiftmailer if you don't already have it installed. Otherwise Swift can autoload it if you put the files in this directory:

```
[swift library root]/classes/Swift/AwsSesTransport.php

```

How do I use it?
----------------

[](#how-do-i-use-it)

Like any other Swiftmailer transport:

```
//Create the desired AWS Transport with the client (for Api v2 do not specify $config_set)
//Standard raw email send
$transport = Swift_AwsSesTransport::newRawInstance($ses_client, $config_set);

//Simple email send (no attachments)
$transport = Swift_AwsSesTransport::newFormattedInstance($ses_client, $config_set);

//Template email send
$transport = Swift_AwsSesTransport::newTemplatedInstance($ses_client, $config_set, $template);
    ->setReplacementData(TEMPLATE_DATA);

//Bulk template email send
$transport = Swift_AwsSesTransport::newBulkInstance($ses_client, $config_set, $template)
    ->setReplacementData(TEMPLATE_DATA)
    ->addDestination(...)
    ->addDestination(...)
    ...
    ->addDestination(...);

//Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);
...
$mailer->send($message);
```

Symfony1.X configuration
------------------------

[](#symfony1x-configuration)

```
```yaml
# app/frontend/config/factories.yml

all:
  mailer:
    class: sfMailer
    param:
      transport:
        class:          SwiftAwsSesTransport
```

```

How do I get the message ID on send?
------------------------------------

[](#how-do-i-get-the-message-id-on-send)

You may register a Swift\_Events\_ResponseListener plugin with a callback.
See example/responseListener.php for details. It is especially useful in combination with async calls.

```
$transport
    ->setAsync(true)
    ->registerPlugin(
        new Swift_Events_ResponseReceivedListener() {
            public function responseReceived( \Swift_Events_ResponseEvent $evt ) {
                $response = $evt->getResponse();//Aws\Result
                $sent = $evt->getSource()->getCount();
                echo sprintf( "Message-ID %s.\n", $response->get("MessageId"));
            }
        });
```

For sync calls, the message ID is available in the header of the message:

```
$message->getHeaders()->get("X-SES-Message-ID");
```

For bulk send, there is an utility method to read all the sent message IDs:

```
$transport->getSentMessageIds();
```

Swiftmailer Version
-------------------

[](#swiftmailer-version)

Tested on versions 5 and 6. For version 5 change method signature inside [AwsSesTransport](classes/Swift/AwsSesTransport.php):

```
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
```

to

```
public function send(Swift_Mime_Message $message, &$failedRecipients = null)
```

Acknowledgments
---------------

[](#acknowledgments)

- @jmhobbs - Original work on AWS SES rest API:
- @laravel - Updated Swift Transport implementation for AWS SES:

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![francescogabbrielli](https://avatars.githubusercontent.com/u/24875983?v=4)](https://github.com/francescogabbrielli "francescogabbrielli (32 commits)")

---

Tags

awsaws-sesaws-ses-transportbulk-emailphpswiftmailerswiftmailer-transporttransport

### Embed Badge

![Health badge](/badges/francescogabbrielli-swift-aws-ses-transport/health.svg)

```
[![Health](https://phpackages.com/badges/francescogabbrielli-swift-aws-ses-transport/health.svg)](https://phpackages.com/packages/francescogabbrielli-swift-aws-ses-transport)
```

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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