Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Universally Accessing Email from within VFP
Message
From
05/05/2005 04:22:07
 
 
To
04/05/2005 13:20:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01010895
Message ID:
01011188
Views:
14
>Anatoliy Mogylevets wrote an excellent article for the April 2005 issue of Foxtalk 2.0. Thanks Anatoliy!
>
>(All of the articles were excellent in that issue by the way - Foxtalk2.0 has turned out to be a great reference - especially since VFP9 was released)
>
>I have code for sending mail using CDO (W2k and above), Outlook via automation, sending via the default mail client (thanks to Rick Strahl's website), and now to via Hotmail and MSN using Outlook Express (thanks to Anatoliy). Has anyone written a function to determine the email mail service on the workstation so the appropriate method could be implemented? Ideally, it would not only send mail but allow the viewing of the mail folders as well (which I have for Outlook only but also Outlook express from Anatoliy's article).
>
>Each method can be implemented now I know, but how to determine which is the correct method to use? Does the user have outlook express and hotmail only or do they have corporate outlook 2002 email, or what? That is what needs to be determined via code if possible...

Tracy,

You have to dig into the registry. Cannot give a foxpro example since I use my own registry class

You are after the application that sends an email if you rightclick on a file in the windows explorer.
One of the options is sendto mail recipient (mailto) and I think this is the default mail handler

You'll find this under: HKEY_CLASSES_ROOT\mailto\shell\open\command
Outlook express: "C:\Program Files\Outlook Express\msimn.exe" /mailurl:%1
Outlook:         "C:\PROGRA~1\MICROS~1\OFFICE11\OUTLOOK.EXE" -c IPM.Note /m "%1"
MailToCmd = lower(registry_Value_of_above)
do case
case 'msimn.exe' $ m.MailToCmd 
    && outlook express

case  'outlook.exe' $ m.MailToCmd 
     && outlook

otherwise
     && I don't know, sorry

endcase
It's all I could find and I use this method also

There may be other ways
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform