Fix wrongly formatted CIDs

This commit is contained in:
M66B 2019-05-24 09:19:22 +02:00
parent 320a196fba
commit b85f41fbc7
1 changed files with 8 additions and 0 deletions

View File

@ -1064,6 +1064,14 @@ public class MessageHelper {
if (apart.attachment.size < 0)
apart.attachment.size = null;
// https://tools.ietf.org/html/rfc2392
if (apart.attachment.cid != null) {
if (!apart.attachment.cid.startsWith("<"))
apart.attachment.cid = "<" + apart.attachment.cid;
if (!apart.attachment.cid.endsWith(">"))
apart.attachment.cid += ">";
}
parts.attachments.add(apart);
}
}