5 Commits

Author SHA1 Message Date
58ad50b96b Refactor: Rename OutgoingEmail to SendingEmail
This commit renames and refactors all instances of `OutgoingEmail` to `SendingEmail` across the codebase to improve terminology consistency and align with domain language.

- Renamed classes, interfaces, and records (e.g., `OutgoingEmailPublisher` → `SendingEmailPublisher`, `OutgoingEmailEvent` → `SendingEmailEvent`).
- Updated method signatures, parameters, and return types to use `SendingEmail`.
- Adjusted dependency injection registrations to reflect the new naming.
- Updated mappings in `EmailMappingProfile` to map `SendEmailCommand` to `SendingEmailEvent`.
- Refactored `SendEmailCommand` and its handler to work with `SendingEmailEvent`.
- Updated `EmailsController` to use `SendingEmailEvent` in the `SendEmail` action.
- Refactored integration tests to test `SendingEmailPublisher` and updated test data accordingly.
- Updated log messages, error handling, and comments to reflect the new terminology.
- Revised documentation and utility methods to use `SendingEmailEvent`.

This refactor ensures consistency, improves readability, and reduces ambiguity in the codebase.
2026-08-05 13:26:21 +02:00
5e587da957 refactor: Rename EmailPorifler to MessagingService 2026-07-24 13:59:43 +02:00
751ef87506 refactor(infrastructure): Improve service implementations and remove legacy references
**Services Refactored:**
- DevExpressPdfProcessingService: Remove unnecessary try-catch (lines 80-87), add stream position validation
- WindreamDmsService: Mark as [Obsolete] - application now only provides email sending functionality
- MailKitEmailService: Keep MailKit implementation (Limilabs DLL to be added separately)

**Custom Exceptions Added:**
- AuthenticationFailedException: OAuth2/IMAP/SMTP authentication failures
- DmsNotAvailableException: windream COM unavailable
- InvalidPdfException: Invalid PDF stream
- NotFoundException: Entity not found in Repository operations

**Legacy Cleanup:**
- Remove legacy VB.NET projects from solution (EmailProfiler.Common, EmailProfiler.Service)
- Delete legacy/ folder reference
- Clean solution file structure

**Stream Validation:**
- All PDF processing methods now validate stream position (reset to 0 if needed)
- Add CanSeek validation for stream-based operations

**Build Status:**  Successful (0 errors, 15 warnings - all acceptable)
2026-07-20 16:36:17 +02:00
0d22fe0b5c docs: Update AGENTS.md and STATUS.md with RabbitMQ and Phase 2 completion
AGENTS.md:
- Add Section 7: RabbitMQ Command Bus Integration (IMPLEMENTED)
- Document ICommandPublisher, RabbitMqCommandPublisher, RabbitMqCommandConsumer
- Add configuration, DI setup, and usage examples
- Document benefits: async processing, horizontal scaling, retries, persistence

STATUS.md:
- Mark Phase 2 (Application Layer) as 100% complete
- Update Phase 3 (Infrastructure Layer) to 15% (RabbitMQ done)
- Document all completed components: DTOs, Commands, Queries, Validators, Mappings
- Update last modified date to 2026-07-14
2026-07-14 16:37:22 +02:00
50c21ee628 Refactor MediatR commands and update solution structure
- Consolidated commands and handlers into single files for better organization.
- Updated file naming conventions for commands and queries.
- Added explicit Git operation rules to prevent automatic commits/pushes.
- Introduced new projects and restructured solution file (`legacy` folder).
- Refactored `CreateEmailAccountCommand`, `ProcessEmailCommand`, and others to use `IUnitOfWork`.
- Enhanced `ProcessEmailCommandHandler` with attachment validation and error handling.
- Removed redundant handler files after consolidation.
- Improved code consistency and added `TODO` comments for future enhancements.
2026-07-09 14:37:12 +02:00