Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Provides an easy ruby DSL & interface to AWS SES
Ruby
tag: v0.3.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/aws
test
.document
.gitignore
CHANGELOG
Gemfile
Gemfile.lock
LICENSE
README
README.erb
Rakefile
TODO
VERSION
aws-ses.gemspec

README

= AWS::SES

AWS::SES is a Ruby library for Amazon's Simple Email Service's REST API (http://aws.amazon.com/ses).

== Getting started

To get started you need to require 'aws/ses':

  % irb -rubygems
  irb(main):001:0> require 'aws/ses'
  # => true

Before you can do anything, you must establish a connection using Base.new.  A basic connection would look something like this:

  ses = AWS::SES::Base.new(
    :access_key_id     => 'abc', 
    :secret_access_key => '123'
  )

The minimum connection options that you must specify are your access key id and your secret access key.


== Send E-mail

Adds functionality for send_email and send_raw_email
Use the following to send an e-mail:

  ses = AWS::SES::Base.new( ... connection info ... )
  ses.send_email :to        => ['jon@example.com', 'dave@example.com'],
               :source    => 'steve@example.com',
               :subject   => 'Subject Line'
               :text_body => 'Internal text body'

You can also send Mail objects using send_raw_email:

  m = Mail.new( :to => ..., :from => ... )
  ses.send_raw_email(m)

send_raw_email will also take a hash and pass it through Mail.new automatically as well.


== Addresses

AWS::SES::Addresses provides for:
* Listing verified e-mail addresses
* Adding new e-mail addresses to verify
* Deleting verified e-mail addresses

You can access these methods as follows:

  ses = AWS::SES::Base.new( ... connection info ... )

  # Get a list of verified addresses
  ses.addresses.list.result

  # Add a new e-mail address to verify
  ses.addresses.verify('jon@example.com')

  # Delete an e-mail address
  ses.addresses.delete('jon@example.com')


== Info

Adds functionality for the statistics and info functionality

You can call 'quota' or 'statistics'


== Rails

This gem is compatible with Rails.  Simply add this to your `config/environments/*.rb` as appropriate:

    ses = AWS::SES::Base.new(
      :access_key_id     => 'abc', 
      :secret_access_key => '123'
    )
    config.action_mailer.deliver_method = ses

== Source

Available at: https://github.com/drewblas/aws-ses

== Contributing to aws-ses
 
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

== Copyright

Copyright (c) 2011 Drew Blas. See LICENSE for further details.

== Thanks

Special thanks to Marcel Molina Jr. for his creation of AWS::S3 which I used portions of to get things working.
Something went wrong with that request. Please try again.