/** * @param prop * @return * @throws DecoderException */ private String getDecodedPropertyalue(Property prop) throws DecoderException { Encoding enc = (Encoding) prop.getParameter(Parameter.Id.ENCODING); String val = prop.getValue(); if (enc != null && enc.getValue().equalsIgnoreCase("QUOTED-PRINTABLE")) { /* * A special Outlook2003 hack. */ if (val.endsWith("=")) { val = val.substring(0, val.length() - 1); } QuotedPrintableCodec codec = new QuotedPrintableCodec(); return codec.decode(val); } else { return val; } }