Each platform has its own way of opening installed apps via URL.
Android has a URL pattern that can be registered, iOS you can set the URL scheme.
How do I send a single URL via mail and make that link open my app on iOS and Android based on the platform the URL was clicked?
You could write a simple web page to detect what browser the request came from and then redirect to the appropriate link. For instance, here is an explanation of redirecting in PHP.
Edit:
Below is a code example. On Android it does bring up a popup and ask for user input because the you Android knows it can open either the Google Play web page or the Google Play app. This is the expected behavior on Android. I haven't tried it on the IPhone, but it shouldn't cause a popup on a desktop computer.
Here is a related question with some other solutions
Edit:
I just noticed, you want to open the app itself not the download page for the app. The code above would still work. You just need to fix the url's. These two questions apply