class Aws::Rails::Mailer

client instance.
Uses the AWS SDK for Ruby’s credential provider chain when creating an SES
config.action_mailer.delivery_method = :ses
(e.g. RAILS_ROOT/config/environments/production.rb)
use this for ActionMailer in your environment configuration
Once you have an SES delivery method you can configure Rails to
Service.
Provides a delivery method for ActionMailer that uses Amazon Simple Email

def deliver!(message)

correctly. Called during mail delivery.
Rails expects this method to exist, and to handle a Mail::Message object
def deliver!(message)
  send_opts = {}
  send_opts[:raw_message] = {}
  send_opts[:raw_message][:data] = message.to_s
  if message.respond_to?(:destinations)
    send_opts[:destinations] = message.destinations
  end
  @client.send_raw_email(send_opts).tap do |response|
    message.header[:ses_message_id] = response.message_id
  end
end

def initialize(options = {})

Parameters:
  • options (Hash) -- Passes along initialization options to
def initialize(options = {})
  @client = SES::Client.new(options)
end

def settings

ActionMailer expects this method to be present and to return a hash.
def settings
  {}
end