diff --git a/lib/fog/aws/requests/ses/send_raw_email.rb b/lib/fog/aws/requests/ses/send_raw_email.rb index d85adf72a..24fe67da8 100644 --- a/lib/fog/aws/requests/ses/send_raw_email.rb +++ b/lib/fog/aws/requests/ses/send_raw_email.rb @@ -5,13 +5,16 @@ module Fog require 'fog/aws/parsers/ses/send_raw_email' - # Delete an existing verified email address + # Send a raw email # # ==== Parameters # * RawMessage <~String> - The message to be sent. # * Options <~Hash> - # * Source <~String> - The sender's email address - # * Destinations <~Array> - The destination for this email, composed of To:, From:, and CC: fields. + # * Source <~String> - The sender's email address. Takes precenence over Return-Path if specified in RawMessage + # * Destination <~Hash> - The destination for this email, composed of To:, From:, and CC: fields. + # * BccAddresses <~Array> - The BCC: field(s) of the message. + # * CcAddresses <~Array> - The CC: field(s) of the message. + # * ToAddresses <~Array> - The To: field(s) of the message. # # ==== Returns # * response<~Excon::Response>: @@ -22,7 +25,9 @@ module Fog def send_raw_email(raw_message, options = {}) params = {} if options.has_key?('Destinations') - params['Destinations'] = AWS.indexed_param('Destinations.member', [*options['Destinations']]) + for key, values in options['Destinations'] + params.merge!(AWS.indexed_param("Destination.#{key}.member", [*values])) + end end if options.has_key?('Source') params['Source'] = options['Source']