I did it with Boto (make sure to get the latest version since SES is new) 
but there's probably and easier way (see link).

Install Boto into your site-packages and then do something like this. Note 
that you have to validate both the "from" address and the "to" address. 
After you are approved for production, you don't have to validate "to" 
addresses.

from boto.ses.connection import SESConnection

aws_key = 'KEY'
aws_secret_key = 'SECRET_KEY'

def verify_email_address():
    conn = SESConnection(aws_key, aws_secret_key)
    m = conn.verify_email_address('[email protected]')

def send_ses(params):
    conn = SESConnection(aws_key, aws_secret_key)
    return conn.send_email(source=params['source'],
                        subject=params['subject'],
                        body=params['body'],
                        to_addresses=params['to_addresses'],
                        cc_addresses=params['cc_addresses'],
                        bcc_addresses=params['bcc_addresses'],
                        format='text',
                        reply_addresses=params['reply_addresses'],
                        return_path=params['return_path'])

Greplin released this for Tornado which I suspect would be easy to port 
over. I had already implemented the Boto solution so stuck with it.
https://github.com/Greplin/greplin-tornado-ses

Reply via email to