lib/mandrails/message_builder.rb
# Internal: Extract attachments.
#
# Returns Array of Hash.
Extract attachments.
Returns Array of Hash.
Extract attachments . Returns Array of Hash .
def attachments
      return unless mail.attachments.length > 0
      mail.attachments.map do |part|
        { type: part.mime_type, name: part.filename, content: Base64.encode64(part.body.raw_source).strip }
      end
    end
def attachments return unless mail . attachments . length > 0 mail . attachments . map do | part | { type : part . mime_type , name : part . filename , content : Base64 . encode64 ( part . body . raw_source ) . strip } end end
Internal: Extract attachments.
Internal : Extract attachments .