'ElastAlert2 How to send email to different recipients based on aggrigation key

How can I send emails to different recipients based on the aggrigation key. For example if aggrigation key value is service1 then its email alerts should be received on emailId1 if aggrigation key value is service2 then its email should be received on emailId2



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source