<commit_before># What is it?

It's a simple transport for use with Swiftmailer to send mail over AWS SES.

As on December 2011, Amazon [provides an SMTP interface to SES](http://aws.amazon.com/ses/faqs/#21), so you may prefer to use Swiftmailer's built in SMTP transport.

There is, however, a [persistent-connections](https://github.com/jmhobbs/Swiftmailer-Transport--AWS-SES/tree/feature/persistent-connections) branch which might get you faster overall throughput than SMTP.  This isn't merged into master yet, so you'll need to tweak your composer.json to install it.  You can find that change, and keep track of progress on [PR #26](https://github.com/jmhobbs/Swiftmailer-Transport--AWS-SES/pull/26).

# Where do I put it?

Whereever you want, so long as you include it in your code.

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);

# Symfony1.X configuration

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

    all:
      mailer:
        class: sfMailer
        param:
          transport:
            class:          Swift_AWSTransport<commit_msg>Update README with composer information.<commit_after># What is it?

It's a simple transport for use with Swiftmailer to send mail over AWS SES.

As on December 2011, Amazon [provides an SMTP interface to SES](http://aws.amazon.com/ses/faqs/#21), so you may prefer to use Swiftmailer's built in SMTP transport.

There is, however, a [persistent-connections](https://github.com/jmhobbs/Swiftmailer-Transport--AWS-SES/tree/feature/persistent-connections) branch which might get you faster overall throughput than SMTP.  This isn't merged into master yet, so you'll need to tweak your composer.json to install it.  You can find that change, and keep track of progress on [PR #26](https://github.com/jmhobbs/Swiftmailer-Transport--AWS-SES/pull/26).

# Where do I put it?

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

    $ 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);

# Symfony1.X configuration

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

    all:
      mailer:
        class: sfMailer
        param:
          transport:
            class:          Swift_AWSTransport
{'fraction_non_alphanumeric': 0.08973531310522918, 'fraction_numerical': 0.0071013557133634605, 'mean_word_length': 3.4783236994219653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3883988', 'n_tokens_mistral': 994, 'n_tokens_neox': 911, 'n_words': 327}