lib/postmark/message_extensions/mail.rb in postmark-1.0.0 vs lib/postmark/message_extensions/mail.rb in postmark-1.0.1
- old
+ new
@@ -51,10 +51,11 @@
options["HtmlBody"] = self.body_html
options["TextBody"] = self.body_text
options["Tag"] = self.tag.to_s if self.tag
%w(to reply_to cc bcc).each do |field|
- next unless value = self.send(field)
+ next unless self.send(field)
+ value = self[field.to_s]
options[::Postmark::Inflector.to_postmark(field)] = Array[value].flatten.join(", ")
end
options.delete_if { |k,v| v.nil? || v.empty? }
end
\ No newline at end of file