Class Mail::AttachmentsList
In: lib/mail/attachments_list.rb
Parent: Array

Methods

[]   []=   guess_encoding   inline   new   set_mime_type  

Public Class methods

Public Instance methods

Returns the attachment by filename or at index.

mail.attachments = File.read(‘test.png’) mail.attachments = File.read(‘test.jpg’)

mail.attachments.filename #=> ‘test.png’ mail.attachments[1].filename #=> ‘test.jpg‘

Uses the mime type to try and guess the encoding, if it is a binary type, or unknown, then we set it to binary, otherwise as set to plain text

[Validate]