Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how do I create email from a windows program

Posted on 2009-05-15
6
Medium Priority
?
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24399091
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 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 24399108
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
ID: 24399148
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
DFW AZURE MEETUP TONIGHT FRI 6PM

We will be discussing what Azure Stack is, how does it fit into the suit of offerings that Azure has currently, and where can it fit into your organizations technology stack. We will also be discussing limitations of the platform while covering various applicable scenarios.

 

Author Comment

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

Author Closing Comment

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

Expert Comment

by:käµfm³d 👽
ID: 24399197
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

660 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