c# - unable to open the default mail client -
I am using the following code to open the default mail client
using Tax (Process Mail Process = New Process ()) {ProcessStartInfo processInfo = new ProcessStartInfo (); ProcessInfo.FileName = string.Format (CultureInfo.InvariantCulture, "mailto: {0}? Subject = {1} & body = {2}", sendToAddress.Address, subject, message); ProcessInfo.UseShellExecute = True; ProcessInfo.WindowStyle = Process WindowStyle.Normal; MailProcess.StartInfo = processInfo; Process.Start (processInfo); }
This process starts but does not show the mail client. In fact, when I'm using only localhost, this mail does not open the client, even though the process is starting She goes.
When I am using Localhost: It works.
Can I solve anything?
This will start the default email client
var process = @ "Mailto: Some.guy@someplace.com? Subject = an email and body = see attachment"; System.Diagnostics.Process.Start (process);
Comments
Post a Comment