instance method
transfer_encoding
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available 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
-
defaultopt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb, line 916
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.7/tmail/interface.rb line 916
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail