Solved

how do I create email from a windows program

Posted on 2009-05-15
6
181 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 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 500 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

920 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

15 Experts available now in Live!

Get 1:1 Help Now