Click here to Skip to main content
15,610,262 members
Articles / Programming Languages / C#
Posted 8 Jun 2011

Tagged as


3 bookmarked

Get Default Mail Client Name

Rate me:
Please Sign up or sign in to vote.
2.80/5 (2 votes)
8 Jun 2011CPOL
How to get the default mail client name.
Here is the code:
public string getDefaultMailClient()
      object mailClient = Registry.GetValue(
        @"HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail", "", "none");
      return mailClient.ToString();
  catch (Exception exGetDefaultMailClient)
      return "Outlook Express";


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

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

Comments and Discussions

GeneralIn Alternate 1, hkey returns a string ¨mailto\shell\open\com... Pin
Salam Y. ELIAS21-Jun-11 8:20
professionalSalam Y. ELIAS21-Jun-11 8:20 
GeneralReason for my vote of 3 Agreed with the others who have comm... Pin
Ed Nutting14-Jun-11 9:15
Ed Nutting14-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
NetSecurity14-Jun-11 2:40 
GeneralAgree with nbgangsta. Update your code. Pin
thatraja10-Jun-11 17:01
professionalthatraja10-Jun-11 17:01 
GeneralBetter yet; just throw an exception. If it's unable to find ... Pin
JV99998-Jun-11 21:43
professionalJV99998-Jun-11 21:43 
GeneralYou're returning Outlook Express if you're unsuccessful? Are... Pin
Groulien8-Jun-11 21:07
Groulien8-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.