Class: TMail::MimeEncodeMulti

Inherits:
Object
  • Object
show all
Defined in:
lib/tmail/net.rb

Overview

:stopdoc:

Instance Method Summary collapse

Instance Method Details

#exec(mail, top = true) ⇒ Object


235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/tmail/net.rb', line 235

def exec( mail, top = true )
  mail.mime_version = '1.0' if top
  mail.set_content_type 'multipart', 'mixed'
  e = encoding(nil)
  if e and not /\A(?:7bit|8bit|binary)\z/i === e
    raise ArgumentError,
          'using C.T.Encoding with multipart mail is not permitted'
  end
  mail.parts.each do |m|
    exec m, false if m._builtin_multipart?
  end
end