Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email Client
Message
 
 
To
31/12/2004 16:01:47
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00973580
Message ID:
00973711
Views:
27
*** StartMail
*** Starts the mail client
#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 )


FUNCTION StartMail

LOCAL lcOpenCommand

oControlRegistry1 = CREATEOBJECT("ControlRegistry")


*** Looks for the default email client
lcMailClient = ;
oControlRegistry1.ReadRegistryString(HKEY_LOCAL_MACHINE,;
"Software\Clients\Mail",;
"")

IF EMPTY(lcMailClient)
MSGBOX("No email client installed")
RETURN
ENDIF

DO CASE
CASE lcMailClient = "Exchange"
CASE lcMailClient = "Internet Mail and News"
CASE lcMailClient = "Outlook Express"
CASE lcMailClient = "Microsoft Outlook"
OTHERWISE
Aviso("Unsuported email client")
ENDCASE

*** Gets the command to start the email client
lcString = "Software\Clients\Mail\"+ALLTRIM(lcMailClient)+"\shell\open\command"

lcOpenCommand = ;
oControlRegistry1.ReadRegistryString(HKEY_LOCAL_MACHINE,;
lcString,;
"")


IF EMPTY(lcOpenCommand)
RETURN .F.
ENDIF


ON ERROR DO Nothing

IF !EMPTY(lcOpenCommand)
RUN /N1 &lcOpenCommand
ENDIF

DO ..\Progs\ErrHand.prg

RETURN .T.

ENDFUNC



FUNCTION Nothing

&& Pues eso, nada

ENDFUNC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform