Closed gnmmdk closed 1 year ago
Currently, my project uses
Mailcore2-android-4.aar This is the aar package compiled in 2016. Is this package too old, so there will be the problem of garbled mail content?
mailcore2-android-4.aar http://d.etpan.org/mailcore2-deps/mailcore2-android/
If I compile the Android AAR package myself, I use https://github.com/dinhvh/libetpan Compile? It seems that this library was modified three years ago! The build-android library under mailcore 2 has not been updated for 7 years https://github.com/MailCore/mailcore2/tree/master/build-android
I use fetchParsedMessageByUIDOperation to get the value of Messageparser, messageParser. htmlRendering() or garbled code。As follows: val messageParserOperation = session.fetchParsedMessageByUIDOperation(mailFolder.folder,uid) messageParserOperation.start(object :OperationCallback{ override fun succeeded() { val messageParser = messageParserOperation.parser() val html = messageParser.htmlRendering() MailCoreLog.e("messageParser html>>>$html") }
override fun failed(p0: MailException?) { } })
The results are as follows:
I use qq mailbox
The following link solves the problem. However, the aar package compiled by the elder brother himself has modified the source code.
I use fetchParsedMessageByUIDOperation to get the value of Messageparser, messageParser. htmlRendering() or garbled code。As follows: val messageParserOperation = session.fetchParsedMessageByUIDOperation(mailFolder.folder,uid) messageParserOperation.start(object :OperationCallback{ override fun succeeded() { val messageParser = messageParserOperation.parser() val html = messageParser.htmlRendering() MailCoreLog.e("messageParser html>>>$html") }
The results are as follows:![image](https://user-images.githubusercontent.com/18391426/222692008-aca7f2f2-ee7f-4d8d-8cfe-f3e352e5015e.png)