A framework to trigger and send automated emails asynchronously based on user behavior