A legacy system with multiple independent modules does not always send notification emails as the code is duplicated many times across the codebase.
Customers always receive notification emails, amount of legacy code decreased, notification business logic isolated into a separate layer.
- Develop tasks queuing and processing mechanics to execute tasks initiated by action or signal.
- Execute tasks in background, fail-resistant.
- Build rules assigning mechanics to send emails defined by configurable conditions.
- Build an API to isolate logic.
- Replace all legacy code with API calls.
- Create admin panel to monitor tasks execution status and configure email sending rules.