2017 © Pedro Peláez
 

library swiftmailer-transport-aws-ses

Add AWS SES support to Swiftmailer

image

jmhobbs/swiftmailer-transport-aws-ses

Add AWS SES support to Swiftmailer

  • Wednesday, May 24, 2017
  • by jmhobbs
  • Repository
  • 3 Watchers
  • 76 Stars
  • 84,224 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 29 Forks
  • 5 Open issues
  • 6 Versions
  • 9 % Grown

The README.md

THIS PACKAGE IS DEPRECATED

This package is deprecated, you should move to the SMTP interface. Read more in SMTP.md, (*1)

There will be no more feature development for this package, and only critical bug fixes will be applied., (*2)

What is it?

It's a simple transport for use with Swiftmailer to send mail over AWS SES., (*3)

As of December 2011, Amazon provides an SMTP interface to SES, so you may prefer to use Swiftmailer's built in SMTP transport., (*4)

Where do I put it?

The best way to use it is through composer., (*5)

$ composer require jmhobbs/swiftmailer-transport-aws-ses

Which will bring in Swiftmailer if you don't already have it installed., (*6)

Otherwise Swift can autoload it if you put the files in this directory:, (*7)

[swift library root]/classes/Swift/AWSTransport.php

How do I use it?

Like any other Swiftmailer transport:, (*8)

//Create the Transport
$transport = Swift_AWSTransport::newInstance( 'AWS_ACCESS_KEY', 'AWS_SECRET_KEY' );

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

$mailer->send($message);

Swiftmailer <= 5.x

The current branch has been update to be compatible with Swiftmailer 6. If you need the old branch, it is availble under the 0.9.x tags, or the swiftmailer-5.x branch., (*9)

Symfony1.X configuration

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

all:
  mailer:
    class: sfMailer
    param:
      transport:
        class:          Swift_AWSTransport
        accessKeyId:    your-access-key
        secretKey:      Y0uR-$3cr3t5-k3y
        debug:          false
        endpoint:       'https://email.us-east-1.amazonaws.com/' # make sure to use trailing slash !
```

How do I get the message ID on send?

You need to register the Swift_Events_ResponseReceivedListener plugin with a callback. See example/responseListener.php for details., (*10)

$transport->registerPlugin(
    new Swift_Events_ResponseReceivedListener( function ( $message, $body ) {
        echo sprintf( "Message-ID %s.\n", $body->SendRawEmailResult->MessageId );
    })
);

Swiftmailer Version

Please note that some users have had issues with older versions of Swiftmailer., (*11)

Versions 4.1.3 and up should work fine., (*12)

Credits

  • @jmhobbs - Original development
  • @bertrandom - Bug fix
  • @themouette - Plugins & Symfony compatible
  • @jonatrey & @faz - Debugging and Testing issue #13
  • @casconed - Made debug function more robust, issue #21
  • @martijngastkemper - Added responseReceived event to get message id from AWS
  • @weierophinney - Swiftmailer 6 support

The Versions

24/05 2017

dev-master

9999999-dev

Add AWS SES support to Swiftmailer

  Sources   Download

MIT

The Requires

 

email swiftmailer aws ses

07/04 2016

dev-feature/persistent-connections

dev-feature/persistent-connections

Add AWS SES support to Swiftmailer

  Sources   Download

MIT

The Requires

 

email swiftmailer aws ses

13/11 2014

dev-develop

dev-develop

Add AWS SES support to Swiftmailer

  Sources   Download

MIT

The Requires

 

email swiftmailer aws ses

13/11 2014

0.9.2

0.9.2.0

Add AWS SES support to Swiftmailer

  Sources   Download

MIT

The Requires

 

email swiftmailer aws ses

19/02 2014

0.9.1

0.9.1.0

Add AWS SES support to Swiftmailer

  Sources   Download

MIT

The Requires

 

email swiftmailer aws ses

30/10 2012

0.9.0

0.9.0.0

Add AWS SES support to Swiftmailer

  Sources   Download

MIT

The Requires

 

email swiftmailer aws ses