Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send email using default email client?

Tags:

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?

like image 392
P a u l Avatar asked Apr 30 '09 23:04

P a u l


People also ask

How do I set a default email to send?

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.

How do I set Outlook as my default email client for mailto links?

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.


1 Answers

Try this:

    System.Diagnostics.Process proc = new System.Diagnostics.Process();     proc.StartInfo.FileName = "mailto:[email protected]?subject=hello&body=love my body";     proc.Start(); 
like image 165
Jay Riggs Avatar answered Oct 19 '22 06:10

Jay Riggs