public String getFrom(MimeMessage mimeMessage) {
        String addr = "";
        try {
            InternetAddress[] address = (InternetAddress[]) mimeMessage.getFrom();

            if (address[0] != null)
                addr = address[0].toString();

            if (addr.startsWith("=?")) {
                addr = MimeUtility.decodeText(addr);
            } else {
                addr = new String(addr.getBytes("ISO8859-1"), "GBK");
            }
        } catch (MessagingException e) {
            e.printStackTrace();
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return addr.replaceAll("<.*>|\"", "");
    }