first you should use $window in angular context if it is possible.
Second you have do decode your uri params because you produce invalid urls.
Use decodeUri or decodeUriComponent to decode special chars correctly (whitespaces and so on)!
E.g. ‘Contact Detail’ should be ‘Contact%20Detail’
That got rid of the error, and looks like it should be all working fine now, hopefully. The iPhone simulator doesn’t appear to have mail app functionality so I guess I’ll just have to wait 'til I can test it on a device properly.
I know that this is an old thread but I just wanted to point out that this probably works on your device because you have a mail account added. mailto: will only work if a mail account is added, otherwise nothing will happen.