Class: TMail::MimeEncodeMulti

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

Overview

:stopdoc:

Instance Method Summary collapse

Instance Method Details

#exec(mail, top = true) ⇒ Object



233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/gems/tmail-1.2.3.1/lib/tmail/net.rb', line 233

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