instance method transfer_encoding

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

transfer_encoding( default = nil )

Returns the transfer encoding of the email. Returns nil if no encoding set or returns whatever default you pass as a parameter - note passing the parameter does NOT change the mail object in any way.

Example:

mail = TMail::Mail.load("path_to/base64_encoded_email")
mail.transfer_encoding #=> "base64"

mail = TMail::Mail.new
mail.transfer_encoding #=> nil
mail.transfer_encoding("base64") #=> "base64"

Parameters

default opt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb, line 884
    def transfer_encoding( default = nil )
      if h = @header['content-transfer-encoding']
        h.encoding || default
      else
        default
      end
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb line 884 · View on GitHub · Improve this page · Find usages on GitHub

Defined in TMail::Mail

Type at least 2 characters to search.

↑↓ navigate · open · esc close