{"action":"reopened","issue":{"url":"https://api.github.com/repos/MailCore/mailcore2/issues/1422","repository_url":"https://api.github.com/repos/MailCore/mailcore2","labels_url":"https://api.github.com/repos/MailCore/mailcore2/issues/1422/labels{/name}","comments_url":"https://api.github.com/repos/MailCore/mailcore2/issues/1422/comments","events_url":"https://api.github.com/repos/MailCore/mailcore2/issues/1422/events","html_url":"https://github.com/MailCore/mailcore2/issues/1422","id":153935710,"number":1422,"title":"Android:POPSession get the email data content garbled, subject is empty","user":{"login":"thingLi","id":13791906,"avatar_url":"https://avatars.githubusercontent.com/u/13791906?v=3","gravatar_id":"","url":"https://api.github.com/users/thingLi","html_url":"https://github.com/thingLi","followers_url":"https://api.github.com/users/thingLi/followers","following_url":"https://api.github.com/users/thingLi/following{/other_user}","gists_url":"https://api.github.com/users/thingLi/gists{/gist_id}","starred_url":"https://api.github.com/users/thingLi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thingLi/subscriptions","organizations_url":"https://api.github.com/users/thingLi/orgs","repos_url":"https://api.github.com/users/thingLi/repos","events_url":"https://api.github.com/users/thingLi/events{/privacy}","received_events_url":"https://api.github.com/users/thingLi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-10T06:54:00Z","updated_at":"2016-05-12T06:29:06Z","closed_at":null,"body":"The log is as follows：\r\n[ EmailInboxBean{fromName='lt227899938@139.com', subject='我正在试用mailCore2发送邮件,这是主题!', content='我是邮件回复的内容', time='16/04/29'}, EmailInboxBean{fromName='EasyBug', subject='获取密码', content='您好，以下是您的账号信息', time='16/01/04'}, \r\nEmailInboxBean{fromName='95555@message.cmbchina.com', subject='', content='Ç×°®µÄÓÃ»§: ¸ÐÐ»Ê¹ÓÃÒ»ÍøÍ¨ÓÃ»§£¬Äú±¾´Î²Ù×÷µÄ¼¤»îÂëÊÇ 088189 ¡£ (ÕâÊÇÒ»·âÓÉÕÐÉÌÒøÐÐ×Ô¶¯·¢ËÍµÄEmail£¬ÄúÎÞÐè»Ø¸´¡£)', time='15/02/08'}, EmailInboxBean{fromName='95555@message.cmbchina.com', subject='', content='»¶Ó­¿ªÁ¢ÕÐÉÌÒøÐÐÕË»§£¡ÄúÔ¤ÁôÔÚÎÒÐÐµÄ180****0447ÊÖ»úºÅ·Ç³£ÖØÒª£¬ÊÇÎÒÐÐÓëÄúÁªÏµºÍ½»Ò×È·ÈÏµÄ¹Ø¼üµç»°£¬ÈçÐè±ä¸üÇë¼°Ê±Í¨¹ýÎÒÐÐ×¨Òµ°æ»ò¹ñÌ¨ÐÞ¸Ä¡£ÓÃ¿¨Ö¸ÄÏÏê¼ûhttp://e95555.cn/vrn7nR', time='15/02/08'}]\r\n\r\nThis is part of my code.\r\n\r\n         //获取邮件信息\r\n         final POPFetchMessagesOperation popFetchMessagesOperation =                                             session.fetchMessagesOperation();\r\n        popFetchMessagesOperation.start(new OperationCallback() {\r\n               @Override\r\n               public void succeeded() {\r\n           //获取收件箱数据\r\n            List info = popFetchMessagesOperation.messages();\r\n            Collections.sort(info,new IndexComparetor());\r\n            for (int i = 0; i < 10; i++) {\r\n                final POPMessageInfo popMessageInfo = info.get(i);\r\n\r\n                //获取头信息\r\n                final POPFetchHeaderOperation operation = session.fetchHeaderOperation(popMessageInfo.index());\r\n                MyLog.d(\"email\",\"popMessageInfo.index= \"+popMessageInfo.index());\r\n                final int finalI = i;\r\n                operation.start(new OperationCallback() {\r\n                    @Override\r\n                    public void succeeded() {\r\n\r\n                        MessageHeader messageHeader = operation.header();\r\n\r\n\r\n                        //发件人 \r\n                        String sendFrom = messageHeader.from().mailbox();\r\n                        String displayName = messageHeader.from().displayName();//别名\r\n\r\n                        // 接收时间\r\n                        Date getTime = messageHeader.receivedDate();\r\n\r\n                        //主题\r\n                        String subject = messageHeader.subject();\r\n\r\n                        //邮箱内容\r\n                        final POPFetchMessageOperation popFetchMessageOperation = session.fetchMessageOperation(popMessageInfo.index());\r\n                        popFetchMessageOperation.start(new OperationCallback() {\r\n                            @Override\r\n                            public void succeeded() {\r\n                                byte[] bytes = popFetchMessageOperation.data();\r\n\r\n                                MessageParser parser = MessageParser.messageParserWithData(bytes);\r\n                                String body = parser.plainTextBodyRendering(true);\r\n                            }\r\n\r\n                            @Override\r\n                            public void failed(MailException e) {\r\n                                MyLog.e(\"email\", \"获取邮箱内容 e=\" + e.getMessage() + \"/\");\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    @Override\r\n                    public void failed(MailException e) {\r\n                        MyLog.e(\"email\", \"获取头信息 e=\" + e.getMessage() + \"/\");\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        @Override\r\n        public void failed(MailException e) {\r\n            MyLog.e(\"email\", \"获取收件箱信息e=\" + e.getMessage() + \"/\");\r\n        }\r\n    });\r\nHow to resolve? Garbled and subject null\r\nthank you!"}}