- Home /
 
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)
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Wils · Nov 16, 2016 at 12:07 PM
The solution is to use Application.OpenURL instead of Process.Start
Example:
 Application.OpenURL("mailto:someone@gmail.com?Subject=Hello%20again&body=TEST");
 
              Answer by UNDERHILL · Nov 16, 2016 at 10:05 AM
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.
Your answer
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Issue with shaders and WebGL 1 Answer
Multiple Cursors - WebGL Unity 5.6 2 Answers