使用javamail从imap服务器检索邮件时的邮件内容异常

时间:2013-08-27 07:04:53

标签: javamail imap

我正在从imap服务器检索邮件,当我执行message.getContent();时邮件为javax.mail.Message 我得到以下例外:

java.io.IOException: Cannot convert DataSource with content type "TEXT/XML; charset=utf-8; name=FILENAME.XML" to object in XmlDataContentHandler
    at com.sun.xml.ws.encoding.XmlDataContentHandler.getContent(XmlDataContentHandler.java:99)
    at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:790)
    at javax.activation.DataHandler.getContent(DataHandler.java:537)
    at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1419)

0 个答案:

没有答案