Click here to Skip to main content
13,198,850 members (41,303 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

19.2K views
3 bookmarked
Posted 8 Jun 2011

Get Default Mail Client Name

, 8 Jun 2011
Rate this:
Please Sign up or sign in to vote.
How to get the default mail client name.
Here is the code:
public string getDefaultMailClient()
{
  try
  {
      object mailClient = Registry.GetValue(
        @"HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail", "", "none");
      return mailClient.ToString();
  }
  catch (Exception exGetDefaultMailClient)
  {
      Util.EscribirLog(exGetDefaultMailClient.Message);
      return "Outlook Express";
  }
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Gustavo Mena
Software Developer gmSoft
Argentina Argentina
This member doesn't quite have enough reputation to be able to display their biography and homepage.

You may also be interested in...

Comments and Discussions

 
GeneralIn Alternate 1, hkey returns a string ¨mailto\shell\open\com... Pin
Salam Y. ELIAS21-Jun-11 8:20
memberSalam Y. ELIAS21-Jun-11 8:20 
GeneralReason for my vote of 3 Agreed with the others who have comm... Pin
EdMan19614-Jun-11 9:15
memberEdMan19614-Jun-11 9:15 
GeneralReason for my vote of 2 Nice short how to but needs to be dr... Pin
NetSecurity14-Jun-11 2:40
memberNetSecurity14-Jun-11 2:40 
GeneralAgree with nbgangsta. Update your code. Pin
thatraja10-Jun-11 17:01
mvpthatraja10-Jun-11 17:01 
GeneralBetter yet; just throw an exception. If it's unable to find ... Pin
JV99998-Jun-11 21:43
memberJV99998-Jun-11 21:43 
GeneralYou're returning Outlook Express if you're unsuccessful? Are... Pin
nbgangsta8-Jun-11 21:07
membernbgangsta8-Jun-11 21:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171020.1 | Last Updated 8 Jun 2011
Article Copyright 2011 by Gustavo Mena
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid