Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#

Get Default Mail Client Name

2.80/5 (2 votes)
8 Jun 2011CPOL 27.9K  
How to get the default mail client name.
Here is the code:
C#
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)