• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 449
  • Last Modified:

How to open a new mail in default email program (outlook) with subject and body message

I have a c# program that have a "Compose Email" button. When you press this button, the program retrieves some data from the database and creates a "to" string, "subject" string and "body" string. I have done this part. But then I want my program to execute the default mail program (normally outlook/outlook express) and start up a new mail where the "to", "subject", and "body" fields are filled out with the three strings I have created. I don't want the mail to be sent automatically, the user still has to press the send button. Can anybody please help me with this??
0
astensland
Asked:
astensland
  • 2
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
Use this:
System.Diagnostics.Process.Start("mailto:hi@hello.com?subject=testletter&body=content");
0
 
astenslandAuthor Commented:
Brilliant emoreau!!! Thanx alot...
0
 
kevlarkevinCommented:
I get Access Is Denied when Using this - Can you help?
0
 
Éric MoreauSenior .Net ConsultantCommented:
kevlarkevin, post your own question!
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now