You can use user-agent
and detect the users's device in JavaScript.
/**
* Determine the mobile operating system.
* This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
*
* @returns {String}
*/
function getMobileOperatingSystem() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Windows Phone must come first because its UA also contains "Android"
if (/windows phone/i.test(userAgent)) {
return "Windows Phone";
}else if (/android/i.test(userAgent)) {
return "Android";
}else if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return "iOS";
}else if (screen.width >= 480) {
return "PC"
}
return "unknown";
}
However, in your case it is not necessary to detect the user's device or operating system. As it was mentioned in the comments, why don't you just put all the links there and let the user choose their prefered platform?
One the other hand, this can be easily played out by sending and email on a certain device and check the same email on another one, for example.
Nonetheless, JavaScript can be manipulated by the users since it's running on the client-side, so for security reasons you may want to use a server-side detection with PHP, or a prebuilt mobile-checking libary.
Reference
How to detect mobile or PC users?
How to detect operating system?