@ Nullable public static String encodeText ( @ Nullable final String name ) { if ( name == null ) { return null ; } try { return MimeUtility . encodeText ( name ) ; } catch ( final UnsupportedEncodingException e ) { throw new IllegalArgumentException ( e . getMessage ( ) , e ) ; } }
To make sure email clients can interpret text properly we need to encode some values according to RFC - 2047 .