Sha256: 364180174c803cf21e9b3b911a794d1625f3c10608ed85acf182e75467206249

Contents?: true

Size: 1.3 KB

Versions: 46

Compression:

Stored size: 1.3 KB

Contents

module Fog
  module AWS
    class SES
      class Real

        require 'fog/aws/parsers/ses/send_raw_email'

        # Send a raw email
        #
        # ==== Parameters
        # * RawMessage <~String> - The message to be sent.
        # * Options <~Hash>
        #   * Source <~String> - The sender's email address. Takes precenence over Return-Path if specified in RawMessage
        #   * Destinations <~Array> - All destinations for this email.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'MessageId'<~String> - Id of message
        #     * 'ResponseMetadata'<~Hash>:
        #       * 'RequestId'<~String> - Id of request
        def send_raw_email(raw_message, options = {})
          params = {}
          if options.has_key?('Destinations')
            params.merge!(Fog::AWS.indexed_param('Destinations.member', [*options['Destinations']]))
          end
          if options.has_key?('Source')
            params['Source'] = options['Source']
          end

          request({
            'Action'          => 'SendRawEmail',
            'RawMessage.Data' => Base64.encode64(raw_message.to_s).chomp!,
            :parser           => Fog::Parsers::AWS::SES::SendRawEmail.new
          }.merge(params))
        end

      end
    end
  end
end

Version data entries

46 entries across 46 versions & 3 rubygems

Version Path
fog-1.22.0 lib/fog/aws/requests/ses/send_raw_email.rb
fog-1.21.0 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/aws/requests/ses/send_raw_email.rb
fog-1.20.0 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/aws/requests/ses/send_raw_email.rb
fog-1.19.0 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/aws/requests/ses/send_raw_email.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/aws/requests/ses/send_raw_email.rb