instance method
unquoted_body
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
unquoted_body(to_charset = 'utf-8')
No documentation comment.
Parameters
-
to_charsetopt = 'utf-8'
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb, line 12
def unquoted_body(to_charset = 'utf-8')
from_charset = sub_header("content-type", "charset")
case (content_transfer_encoding || "7bit").downcase
when "quoted-printable"
# the default charset is set to iso-8859-1 instead of 'us-ascii'.
# This is needed as many mailer do not set the charset but send in ISO. This is only used if no charset is set.
if !from_charset.blank? && from_charset.downcase == 'us-ascii'
from_charset = 'iso-8859-1'
end
Unquoter.unquote_quoted_printable_and_convert_to(quoted_body,
to_charset, from_charset, true)
when "base64"
Unquoter.unquote_base64_and_convert_to(quoted_body, to_charset,
from_charset)
when "7bit", "8bit"
Unquoter.convert_to(quoted_body, to_charset, from_charset)
when "binary"
quoted_body
else
quoted_body
end
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb line 12
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail