Sha256: 9122d09874b5c3e626c749b73ed48df9ec02c99ea160484c3e02d65cf48ecb16

Contents?: true

Size: 483 Bytes

Versions: 3

Compression:

Stored size: 483 Bytes

Contents

# frozen_string_literal: true

require "aws/ses"

class Eye::Notify::SES < Eye::Notify

  param :access_key_id, String, true
  param :secret_access_key, String, true
  param :from, String, true

  def execute
    AWS::SES::Base.new(
      access_key_id: access_key_id,
      secret_access_key: secret_access_key,
    ).send_email(message)
  end

  def message
    {
      to: contact,
      from: from,
      subject: message_subject,
      text_body: message_body,
    }
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eye-patch-1.1.0 lib/eye/notify/ses.rb
eye-patch-1.0.1 lib/eye/notify/ses.rb
eye-patch-1.0.0 lib/eye/notify/ses.rb