Solved

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

Posted on 2004-05-02
4
433 Views
Last Modified: 2010-04-15
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
Comment
Question by:astensland
  • 2
4 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 10973525
Use this:
System.Diagnostics.Process.Start("mailto:hi@hello.com?subject=testletter&body=content");
0
 

Author Comment

by:astensland
ID: 10975047
Brilliant emoreau!!! Thanx alot...
0
 

Expert Comment

by:kevlarkevin
ID: 11201380
I get Access Is Denied when Using this - Can you help?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11201752
kevlarkevin, post your own question!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What can cause the styling on a .NET site to not be found? 17 29
C# LINQ ForEach() question 6 54
IEnumerable<T> to a List<T> 8 40
Problem to Office 1 15
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question