Add support for email attachments in SendEmailCommand

Enhanced the email-sending workflow to support attachments:
- Updated `SendEmailCommand` with an `Attachments` property.
- Added `WithAttachments` method to handle attachment initialization.
- Modified `EmailsController` to accept file uploads via `IFormFileCollection`.
- Implemented `BuildAttachmentsAsync` to process uploaded files.
- Updated `EmailMappingProfile` to map `Attachments` to `EmailContext`.
- Adjusted `SendEmail` endpoint to consume `multipart/form-data`.
- Enhanced `SendEmail` response to include the queued event ID.
- Updated project file to include Swagger infrastructure folder.

These changes enable handling of email attachments and improve API functionality.
This commit is contained in:
2026-08-05 17:14:44 +02:00
parent 890c32f1c8
commit 2e69fac250
4 changed files with 59 additions and 12 deletions

View File

@@ -36,4 +36,8 @@
<ProjectReference Include="..\..\infrastructure\DigitalData.MessagingService.Infrastructure\DigitalData.MessagingService.Infrastructure.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Infrastructure\Swagger\" />
</ItemGroup>
</Project>