Issue #2361757 by rpayanm: Remove usage of mime_header_encode().
Issue #2361711 by rpayanm: Remove usage of drupal_convert_to_utf8().