From 109535d7a9b2911a9d0c20ba2df90edb34998f90 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 12 Apr 2011 02:23:01 -0700 Subject: [PATCH] fix format of Destinations in send_raw_email and correct doc --- lib/fog/aws/requests/ses/send_raw_email.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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']