Download the PHP package jmhobbs/swiftmailer-transport-aws-ses without Composer
On this page you can find all versions of the php package jmhobbs/swiftmailer-transport-aws-ses. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jmhobbs/swiftmailer-transport-aws-ses
More information about jmhobbs/swiftmailer-transport-aws-ses
Files in jmhobbs/swiftmailer-transport-aws-ses
Package swiftmailer-transport-aws-ses
Short Description Add AWS SES support to Swiftmailer
License MIT
Informations about the package swiftmailer-transport-aws-ses
THIS PACKAGE IS DEPRECATED
This package is deprecated, you should move to the SMTP interface. Read more in SMTP.md
There will be no more feature development for this package, and only critical bug fixes will be applied.
What is it?
It's a simple transport for use with Swiftmailer to send mail over AWS SES.
As of December 2011, Amazon provides an SMTP interface to SES, so you may prefer to use Swiftmailer's built in SMTP transport.
Where do I put it?
The best way to use it is through composer.
$ composer require jmhobbs/swiftmailer-transport-aws-ses
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/AWSTransport.php
How do I use it?
Like any other Swiftmailer transport:
//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.
Symfony1.X configuration
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.
$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.
Versions 4.1.3 and up should work fine.
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