Hello adminuniscan,
you can do that with one of the below methods:
1- from the CLI issue the command altsrchost, and create a mapping that the emails from domain 1 should use the interface that has the IP1 and emails from domain 2 should use the second interface that has IP2
2- create a message filter with the condition on the mail from and the action of alt-src-host or an outgoing content filter with the action of Deliver from IP Interface
feel free to check the following as well
https://www.cisco.com/c/en/us/support/docs/security/email-security-appliance/118132-configure-esa-00.html
Regards,
Muna Bali