Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a new email, and assign subject, using .NET Compact Framework

Basically I'm trying to accomplish the same thing that "mailto:[email protected]" does in Internet Explorer Mobile.

But I want to be able to do it from a managed Windows Mobile application. I don't want to send an email pro grammatically in the background.

I want to be able to create the email in Pocket Outlook and then let the user do the rest.

Hopefully that helps you hopefully help me!

like image 344
Chris Craft Avatar asked Oct 06 '08 13:10

Chris Craft


1 Answers

I assume you use C#. You add a reference to System.Diagnostics and then write the following code:

ProcessStartInfo psi = 
  new ProcessStartInfo("mailto:[email protected]?subject=MySubject", "");
Process.Start(psi);

This will start the default email client on your mobile device.

The mailto protocol definition might come handy too.

like image 169
Petros Avatar answered Sep 25 '22 01:09

Petros