C# WebGL open email client Win32 exception

Hi,

I want to send an email in a WebGL build using C#. I used

try
{
   Uri myUri = new Uri("mailto:anemailaddress@example.com?Subject=Hello%20again&body=TEST");
   System.Diagnostics.Process.Start(myUri.AbsoluteUri);
}
catch (Win32Exception e)
{
  Debug.LogError(e.Message);
}
catch (Exception e)
{
  Debug.LogError(e.Message);
}

to open an email client. But I get the following error as well as a Win32Exception : Success error

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/WebGL/runtime/DebugBindings.gen.cpp Line: 51)

a9b4b6fe-b629-4efc-bb29-821d1f0fcea2:9085:3
Not implemented icall: Process::ShellExecuteEx_internalUnityLoader.js:3541:3
Success
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/WebGL/runtime/DebugBindings.gen.cpp Line: 51)

I am pretty sure that unless you are running Unity/the game as an administrator you are not going to have rights to execute shell commands.

The solution is to use
Application.OpenURL instead of Process.Start

Example:

Application.OpenURL("mailto:someone@gmail.com?Subject=Hello%20again&body=TEST");