I previously blogged on afterthoughts on NServiceBus course. Equipped with new powerful knowledge I have approached on of the TODO tasks on my plate – decouple email notification service from the main web application.
First, the problem with the code that needed to be resolved. A customer is submitting content that has to be approved. Once content was submitted, an email is generated to notify approver. Approver either rejects or accepts the content, and notification is sent to the customer. Simple. Yet the original implementation has email notification logic residing within the application. What happens when application explodes or SMTP is down? Out of luck, sorry.