lib/postmark/message_extensions/mail.rb in postmark-1.0.2 vs lib/postmark/message_extensions/mail.rb in postmark-1.1.0
- old
+ new
@@ -45,12 +45,15 @@
protected
def export_native_attachments
attachments.map do |attachment|
- {"Name" => attachment.filename,
- "Content" => pack_attachment_data(attachment.body.decoded),
- "ContentType" => attachment.mime_type}
+ basics = {"Name" => attachment.filename,
+ "Content" => pack_attachment_data(attachment.body.decoded),
+ "ContentType" => attachment.mime_type}
+ specials = attachment.inline? ? {'ContentID' => attachment.url} : {}
+
+ basics.update(specials)
end
end
def bogus_headers
%q[