Fix inline CID attachments by using multipart/related to avoid duplicate attachment previews#1499
Fix inline CID attachments by using multipart/related to avoid duplicate attachment previews#1499Philodoescode wants to merge 3 commits intojenkinsci:mainfrom
Conversation
|
Hi @Philodoescode! The CI failure is in ExtendedEmailPublisherTest.testPlainTextAndHtml — this test is likely failing because the MIME structure change (adding multipart/related wrapper) broke an existing assertion about the email structure. Root: multipart/mixed Also note: the PR is merging from your main branch instead of a feature branch — this is not ideal practice. Consider creating a dedicated feature branch for cleaner history. |
|
Hi 👋 I took a closer look at the failing test ( Since this change introduces a nested I’d be happy to help update the test accordingly if that sounds good. Thanks! |
|
Is this a follow-on to #1465? |
Yes, it is |
This change improves how inline attachments are sent so clients like Microsoft Teams render CID images correctly without also showing them as normal attachment previews. #1438 #1465
Changes:
ExtendedEmailPublisherto build a MIME tree with:multipart/mixedmultipart/relatedcreateTextContentPart(...)to make it reusable in the new MIME structure.multipart/relatedsection instead of the root mixed section.multipart/mixed.AttachmentUtilsto only setContent-IDfor inline attachments (not regular attachments).note: I apologize that the branch merging from is the main branch and not the feature branch from my forked repo.