Unity "Application.OpenURL" Doesnt work.

Hi,

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

Application.OpenURL(“mailto:email@hotmail.com?subject=Email&body=Unity”);

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”?

Thanks.

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;
Application.OpenURL(mailURL);

i did Unity editor and iPhone.

Application.OpenURL(“mailto:email@hotmail.com?subject=Email&body=Unity”);

I guess Android is only Pro.

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