class Mail::Utilities::BestEffortCharsetEncoder

def encode(string, charset)

def encode(string, charset)
  case charset
  when /utf-?7/i
    Mail::Utilities.decode_utf7(string)
  else
    string.force_encoding(pick_encoding(charset))
  end
end