mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 17:27:00 +00:00
Added TNEF body text
This commit is contained in:
parent
7a87f4bac5
commit
1cef1236af
1 changed files with 9 additions and 2 deletions
|
@ -2089,13 +2089,20 @@ public class MessageHelper {
|
||||||
if (TextUtils.isEmpty(body)) {
|
if (TextUtils.isEmpty(body)) {
|
||||||
org.apache.poi.hmef.attribute.MAPIAttribute attr =
|
org.apache.poi.hmef.attribute.MAPIAttribute attr =
|
||||||
msg.getMessageMAPIAttribute(org.apache.poi.hsmf.datatypes.MAPIProperty.BODY_HTML);
|
msg.getMessageMAPIAttribute(org.apache.poi.hsmf.datatypes.MAPIProperty.BODY_HTML);
|
||||||
|
if (attr == null)
|
||||||
|
attr = msg.getMessageMAPIAttribute(org.apache.poi.hsmf.datatypes.MAPIProperty.BODY);
|
||||||
if (attr != null) {
|
if (attr != null) {
|
||||||
EntityAttachment attachment = new EntityAttachment();
|
EntityAttachment attachment = new EntityAttachment();
|
||||||
attachment.message = local.message;
|
attachment.message = local.message;
|
||||||
attachment.sequence = local.sequence;
|
attachment.sequence = local.sequence;
|
||||||
attachment.subsequence = ++subsequence;
|
attachment.subsequence = ++subsequence;
|
||||||
|
if (attr.getProperty().equals(org.apache.poi.hsmf.datatypes.MAPIProperty.BODY_HTML)) {
|
||||||
attachment.name = "body.html";
|
attachment.name = "body.html";
|
||||||
attachment.type = "text/html";
|
attachment.type = "text/html";
|
||||||
|
} else {
|
||||||
|
attachment.name = "body.txt";
|
||||||
|
attachment.type = "text/plain";
|
||||||
|
}
|
||||||
attachment.disposition = Part.ATTACHMENT;
|
attachment.disposition = Part.ATTACHMENT;
|
||||||
attachment.id = db.attachment().insertAttachment(attachment);
|
attachment.id = db.attachment().insertAttachment(attachment);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue