Email Verification template - identify userAgent


I am using Verification Email template.

Is it possible to identify the email opening in Desktop or IOS ??

my requirement is , it email is opening in desktop I need to redirect in to another webpage. and it its in IOS need to redirect in to the RedirectURL.

is it possible ?

I tried this but not identifying IOS

{% if request.headers.user-agent == “User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; nl-nl) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5” %}

Confirm my mobile account

{% else %}

Confirm my account

{% endif %}