大家好:)我正在从pop3服务器上获取一些邮件而且我在阅读multipart/mixed
邮件时遇到了一些麻烦。我跟踪了当我做的事情时发生的事情:
} else if (p.isMimeType("multipart/*")) {
Multipart mp = (Multipart) p.getContent();
System.out.println(mp.getCount()); // Throws
// ...
}
这引发:
javax.mail.MessagingException: Unexpected response: Write back to blah@blah.com
at org.apache.geronimo.javamail.store.pop3.POP3ResponseBuilder.buildResponse(POP3ResponseBuilder.java:86)
at org.apache.geronimo.javamail.store.pop3.POP3Connection.sendCommand(POP3Connection.java:154)
at org.apache.geronimo.javamail.store.pop3.message.POP3Message.getContentStream(POP3Message.java:88)
at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:46)
at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:169)
at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:104)
at fr.clcg.basemkt.npai.ImportNPAIFromMail.getText(ImportNPAIFromMail.java:214)
Write back to blah@blah.com
缺少服务器的某些响应状态。
根据我使用的this implementation,它应该接收+OK Write back to blah@blah.com
,-ERR Write back to blah@blah.com
或+ [...]
;但我只得到消息而不是状态,并且在第86行引发错误。