Use attachment disposition for inline images

This commit is contained in:
M66B
2019-01-06 11:00:08 +00:00
parent ae1a36b482
commit 2be2d10c27
10 changed files with 1314 additions and 38 deletions

View File

@@ -340,6 +340,8 @@ public class MessageHelper {
}
});
bpAttachment.setDataHandler(new DataHandler(dataSource));
if (attachment.disposition != null)
bpAttachment.setDisposition(attachment.disposition);
if (attachment.cid != null)
bpAttachment.setHeader("Content-ID", attachment.cid);
@@ -639,6 +641,7 @@ public class MessageHelper {
EntityAttachment attachment = new EntityAttachment();
attachment.name = filename;
attachment.type = ct.getBaseType().toLowerCase();
attachment.disposition = disposition;
attachment.size = part.getSize();
attachment.cid = (cid == null || cid.length == 0 ? null : cid[0]);
attachment.encryption = (pgp ? EntityAttachment.PGP_MESSAGE : null);