lib/iso2022jp_mailer.rb class Iso2022JpMailer < ActionMailer::Base @@default_charset = 'iso-2022-jp' @@encode_subject = false def base64(text, charset='iso-2022-jp', convert=true) if convert && charset == "iso-2022-jp" text = NKF.nkf("-j -m0", text) end text = TMail::Base64.folding_encode(text) "=?#{charset}?B?#{text}?=" end def create!(*) super @mail.subject = base64(@mail.subject) part = @mail.p