1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

fix format of Destinations in send_raw_email and correct doc

This commit is contained in:
John Hawthorn 2011-04-12 02:23:01 -07:00
parent d938bc8fc1
commit 109535d7a9

View file

@ -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']