generated from micronaut-projects/micronaut-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
feat: Improve Attachment Model with FileAttachment and InlineAttachment (#554) #568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Vin-it-9
wants to merge
8
commits into
micronaut-projects:3.0.x
Choose a base branch
from
Vin-it-9:feature/type-safe-attachments
base: 3.0.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: Improve Attachment Model with FileAttachment and InlineAttachment (#554) #568
Vin-it-9
wants to merge
8
commits into
micronaut-projects:3.0.x
from
Vin-it-9:feature/type-safe-attachments
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nlineAttachment classes - Add EmailAttachment sealed interface for strongly typed attachments - Implement FileAttachment for downloadable files with builder API - Implement InlineAttachment for embedded content with ContentId support - Add ContentId value type for RFC 2392-compliant inline references - Enhance Attachment with isInline() method for disposition checks
…hment and InlineAttachment
…acy compatibility
sdelamo
requested changes
Dec 1, 2025
Contributor
|
@Vin-it-9 could you change the base of this PR to 4.12.x ? |
sdelamo
requested changes
Dec 2, 2025
Co-authored-by: Sergio del Amo <[email protected]>
Author
I tried to change the base, but I can’t find a 4.12.x branch in this repo. Which branch should I use? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds type-safe attachment support with
FileAttachmentandInlineAttachmentclasses, improving API clarity and type safety for email attachments.Changes
New Classes
FileAttachment- Type-safe regular file attachments with builder patternInlineAttachment- Type-safe inline attachments for HTML emailsContentId- RFC 2392 Content-ID value objectEmailAttachment- Sealed interface for attachment typesModified Classes
Email.Builder- Added overloadedattachment()methods acceptingFileAttachmentandInlineAttachmentAttachment- AddedisInline()helper methodKey Features
.contentId("logo123")instead ofnew ContentId("logo123")AttachmentAPI continues to workList<Attachment>)Testing
EmailAttachmentSpec.groovy)Example Usage
FileAttachment:
InlineAttachment:
Related Issues
Closes #554
Checklist