I need to start a MAPI session to send email from a VB6 app, and to do that, I need to find the name of the installed default email client (Outlook, Outlook Express, etc). Does anyone know where to look in the registry to find the name of the local email client? I don't want the user to have to select the default email client each time they want to send an email.
Here is the pseudo-code for what I am doing:
Code:
'Create an object of the Session
Set m_objSession = CreateObject(MAPI_SESSION)
'try to logon to an existing open email system - if one is not running
'then we will try some other options in the errorhandler
m_objSession.Logon ShowDialog:=False, Newsession:=False
'if that fails, then in the error handler, find the default
'profile in the registry and then try
m_objSession.Logon ProfileName:=DefaultMapiProfile, ShowDialog:=False, Newsession:=True
I found a post on this a year ago, but since the wrox site has changed I cannot search/find that post again. The code from that post was correct in finding the default email profile for Win2K and NT in the registry at HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current Version\Windows Messaging Subsystem\Profiles. However, I either mistyped the location for Win9x systems or the info was wrong and not fully tested

because I now get errors.
Thanks!
Mark Phillips
