Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Identify the default email client
Message
From
21/09/2005 19:20:14
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01051778
Message ID:
01051817
Views:
13
Thanks Naomi, is there another routine 'registry.prg' that goes with this code?

>
>#define HKEY_CLASSES_ROOT           -2147483648  && (( HKEY )
>*0x80000000 )
>#define HKEY_CURRENT_USER           -2147483647  && (( HKEY )
>*0x80000001 )
>#define HKEY_LOCAL_MACHINE          -2147483646  && (( HKEY )
>*0x80000002 )
>#define HKEY_USERS                  -2147483645  && (( HKEY )
>*0x80000003 )
>local oRegistry, lcMailClient
>oRegistry = newobject("Registry","Registry.prg")
>**** getting th default email client NAME! **********
>lcMailClient = ;
>	oRegistry.ReadRegistryString(HKEY_LOCAL_MACHINE,;
>	"Software\Clients\Mail", ;
>	"")
>
>if empty(m.lcMailClient)
>	=messagebox("No email client installed")
>	return ""
>endif
>
>return m.lcMailClient
>
>
>
>
>Unfortunately, I don't see any credit given in this code. I guess, I picked it from here and forgot to put proper credentials :(
>
>>I have a button in my application that drafts an email message to the person in the table. The code is this:
>>
>>oOutlook=CREATEOBJECT("Outlook.Application")
>>oNewMail=oOutlook.CreateItem(0) 		&& 0 = olMailItem
>>oNewMail.Recipients.Add(E_mail)
>>oNewMail.Subject=""
>>oNewMail.Body=""
>>oNewMail.display
>>
>>
>>This works fine if the user has outlook installed as their email client. However my users use a variety of email clients including Eudora and others. Is there a way to programmatically identify the default email client and start it up with code equivalent to the above?
>>
>>Thanks for any help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform