class Mail::Message

def convert_to_multipart

def convert_to_multipart
  text_part = Mail::Part.new(:body => body.decoded)
  MULTIPART_CONVERSION_CONTENT_FIELDS.each do |field_name|
    if value = send(field_name)
      writer = :"#{field_name}="
      text_part.send writer, value
      send writer, nil
    end
  end
  text_part.charset = charset unless @defaulted_charset
  self.body = ''
  self.body << text_part
end