I want to send an email from a .net windows forms application using the system's default email client (thunderbird, outlook, etc.). I'd like to preset the subject and body text -- I think there's a way to do this by sending something like this to windows explorer: "mailto:[email protected]?subject=mysubject&body=mymessage". Do you have any examples on this?
Always use the default email account for sending new emailSelect File > Options > Mail. Under Send Messages, check the box Always use the default account when composing new messages. Select OK.
Open Outlook. On the File tab, choose Options. Under Start up options, select the Make Outlook the default program for E-mail, Contacts, and Calendar check box. Click OK.
Try this:
System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = "mailto:[email protected]?subject=hello&body=love my body"; proc.Start();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With