25fb48ccf048ed4ce30778292e59a0bb00d68456
- Extract email template handling, rendering, and sending code into `Worker.Services` project. - Introduce `EmailTemplateService`, `EmailTemplateRenderingService`, and `SendEmailService`. - Simplify consumer logic by delegating to scoped services. - Update project dependencies and package references accordingly.
hrynco-notification-service
Notification worker flow
flowchart TD
A[Worker host starts] --> B[Load config and register services]
B --> C[Start SendEmailConsumer]
C --> D[Receive message from notification.send-email]
D --> E[Resolve SendEmailService]
E --> F[Pick channel and template]
F --> G[Render email content]
G --> H[Send via SMTP]
H --> I[Update usage counters]
I --> J[Optionally publish result to reply queue]
H -. failure .-> K[Log and rethrow]
Description
Languages
C#
76.6%
HTML
17.1%
CSS
3.8%
Dockerfile
2.5%