lib/multi_mail/mandrill/message.rb in multi_mail-0.1.0 vs lib/multi_mail/mandrill/message.rb in multi_mail-0.1.1

- old
+ new

@@ -20,20 +20,20 @@ # Returns the message headers in Mandrill format. # # @return [Hash] the message headers in Mandrill format def mandrill_headers - headers = {} + hash = {} header_fields.each do |field| key = field.name.downcase # Mandrill only allows Reply-To and X-* headers currently. # https://mandrillapp.com/api/docs/messages.ruby.html if key == 'reply-to' || key.start_with?('x-') - headers[field.name] = field.value + hash[field.name] = field.value end end - headers + hash end # Returns the message's attachments in Mandrill format. # # @return [Array<Faraday::UploadIO>] the attachments in Mandrill format @@ -63,9 +63,10 @@ 'from_name' => from && self[:from].display_names.first, 'to' => mandrill_to, 'headers' => mandrill_headers, 'attachments' => attachments, 'images' => images, + 'tags' => tags, } normalize(hash) end end