class Aws::Rails::SesMailer

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)
  params = {
    raw_message: { data: message.to_s },
    source: message.smtp_envelope_from, # defaults to From header
    destinations: message.smtp_envelope_to # defaults to destinations (To,Cc,Bcc)
  }
  @client.send_raw_email(params).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