Unity "Application.OpenURL" Doesnt work.


I’m trying to use this code to open up email composer:


but the problem is it doesn’t work. I replaced the url with “www.google.com” and it works fine but as soon as I replace it with mailto, doesnt work.

I even used “mailto:email@hotmail.com?subject=Email&body=Unity” on my browser and it works.

Can someone please help me with this. Is there anything I should do in Unity before using “mailto”?


I was also having difficulties with this which turned out to be a need to escape some characters (like spaces etc.) in the mail subject. This can be done using System.Uri.EscapeDataString.

string mailSubject = System.Uri.EscapeDataString ("Email from my Unity app");
string mailRecipient = "not_real@umail.com";
string mailURL = "mailto:" + mailRecipient + "?subject=" + mailSubject;

i did Unity editor and iPhone.


I guess Android is only Pro.

Hi I tried with unity 4.2 pro , andorid working fine , Thank you