I had a look at this as a follow up to my answer to the previous question. The problem lies with TMail. It automatically removes and carriage returns from the subject. I created the following monkey patch as it seems to be the only solution to stop TMail's behaviour.
module TMail
class SubjectHeaderField < UnstructuredHeader
def parse
#Do nothing
end
end
class HeaderField
FNAME_TO_CLASS = FNAME_TO_CLASS.merge('subject' => SubjectHeaderField)
end
end
If you include it in the mailer in Rails 2.3.x it should work. Alternatively you might want to look at http://github.com/mikel/mail/ which is the default mailer in Rails 3?
Then you can set the header before encoding as the previous answer showed.