Solved

how do I create email from a windows program

Posted on 2009-05-15
6
180 Views
Last Modified: 2013-12-17
I am trying to create a windows app that will automaticaly launch outlook with the email populated as id does in ASP apps but this is inside a windows app on a button click. Does anyone have any ideas?
0
Comment
Question by:HawaiiDragon
  • 3
  • 3
6 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
Comment Utility
A really cheap way to do it would be to use Process.Start:
System.Diagnostics.Process.Start("mailto:abc@example.com?subject=Hello%20Tiger&body=Just%20wanted%20to%20say%20hey!")

Open in new window

0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
Comment Utility
A really cheap way to do it would be to use Process.Start:
System.Diagnostics.Process.Start("mailto:example@example.com?subject=Hello%20Tiger&body=Just%20wanted%20to%20say%20hey!")

Open in new window

0
 

Author Comment

by:HawaiiDragon
Comment Utility
right I looked at that but I just wanted to launch Outlook. With the email address pre populated like a web app does.
for some reason "mailto:XXX@example.com" will not work the way it does in a web app
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:HawaiiDragon
Comment Utility
oh yea and im trying to do it on a button click. Yea I know im complicated.
0
 

Author Closing Comment

by:HawaiiDragon
Comment Utility
man I sooooooo overlooked that sorry im a goof ball ... 2 days with no sleep will do that one
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
Comment Utility
Well for your button click, you would do something like in the snippet. The way I wrote the code above, Process.Start will try to execute the "mailto..." command using the default application that is registered on you system to handle mailto links. If Outlook is your default email program, then Outlook should open when this line is executed.
private void button1_Click(object sender, EventArgs e)

{

    System.Diagnostics.Process.Start("mailto:example@example.com?subject=Hello%20Tiger&body=Just%20wanted%20to%20say%20hey!")
 

}

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now