lib/postmark/message_extensions/mail.rb in postmark-0.9.18 vs lib/postmark/message_extensions/mail.rb in postmark-0.9.19

- old
+ new

@@ -20,8 +20,22 @@ body.to_s else text_part.body.to_s end end + + def export_attachments + export_native_attachments + postmark_attachments + end + + protected + + def export_native_attachments + attachments.map do |attachment| + {"Name" => attachment.filename, + "Content" => pack_attachment_data(attachment.body.decoded), + "ContentType" => attachment.mime_type} + end + end end end \ No newline at end of file