AWS::SES

<%= docs_for %>

Send E-mail

<%= docs_for [‘AWS::SES::SendEmail’] %>

Addresses

<%= docs_for %>

Info

<%= docs_for %>

Rails

This gem is compatible with Rails >= 3.0.0 and Ruby 2.3.x

To use, first add the gem to your Gemfile:

gem "aws-ses", "~> 0.7.1", :require => 'aws/ses'

For Rails 3.x

Then, add your Amazon credentials and extend ActionMailer in ‘config/initializers/amazon_ses.rb`:

ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base,
  :access_key_id     => 'abc',
  :secret_access_key => '123',
  :signature_version => 4

Then set the delivery method in ‘config/environments/*rb` as appropriate:

config.action_mailer.delivery_method = :ses

For Rails 2.3.x

Then set the delivery method in ‘config/environments/*rb` as appropriate:

config.after_initialize do
  ActionMailer::Base.delivery_method = :amazon_ses
  ActionMailer::Base.custom_amazon_ses_mailer = AWS::SES::Base.new(:secret_access_key => 'abc', :access_key_id => '123')
end

Issues

HTTP Segmentation fault

If you get this error:

net/http.rb:677: [BUG] Segmentation fault

It means that you are not running with SSL enabled in ruby. Re-compile ruby with ssl support or add this option to your environment:

RUBYOPT="-r openssl"

Rejected sending

If you are receiving this message and you HAVE verified the [source] please check to be sure you are not in sandbox mode!

"Email address is not verified.MessageRejected (AWS::Error)"

If you have not been granted production access, you will have to verify all recipients as well.

docs.amazonwebservices.com/ses/2010-12-01/DeveloperGuide/index.html?InitialSetup.Customer.html

Source

Available at: 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 © 2020 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.

Other Contributors:

  • croaky

  • nathanbertram

  • sshaw

  • teeparham (documentation)

  • pzb

  • NicholasHely

  • m33h