The difficulty is that your emailing strategy, the content, etc... change over time. So you don't want to tie it to much with your product code. Decoupled is better. That allows A/B testing without touching your code.
A marketing automation tool allows you to centralize marketing emails as well as transactional emails in one thing, decoupled. Your product emits events with some attributes, and the tool react to it.
Examples with "user_registered" and "user_ordered" events:
- confirmation of order (at "user_ordered")
- ask for a review (at "user_ordered" + 3 days)
- welcome process (drip emails starting at "user_registered")
- wake up campaigns (no "user_ordered" events since 1 month)
- sending a notice for a new product Z to users having bought product X or product Y (segment on users having "user_ordered" for product_id IN (product X id or product Y id))
- ... there is no limit to imagination, I love that!
Shameless plug if I may, I'd like to know your interests in such a tool: https://docs.google.com/forms/d/e/1FAIpQLSc5J5BuP_dEfXPEtXV0...