Customize emails based on database connection

I am wondering if it’s possible to customize email content, specifically the reset password email content, based on which database connection the user belongs to?

According to the reference documentation the connection name is surfaced to the template so customization based on that would be possible. You can also make use of the Liquid debug tag to have confirmation of the information that is surfaced to each template.