Destructively sets the character set used by this mail object to the passed string, you should note though that this does nothing to the mail body, just changes the header value, you will need to transliterate the body as well to match whatever you put in this header value if you are changing character sets.
Example:
mail = TMail::Mail.new mail.charset #=> nil mail.charset = "UTF-8" mail.charset #=> "UTF-8"
Source Code
# File action_mailer/vendor/tmail-1.2.2/tmail/interface.rb, line 856 def charset=( str ) if str if h = @header[ 'content-type' ] h['charset'] = str else store 'Content-Type', "text/plain; charset=#{str}" end end str end
<code/>and<pre/>for code samples.