Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email/Web Site Nav
Message
From
03/05/1999 13:36:26
 
 
To
03/05/1999 13:10:58
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00214551
Message ID:
00214633
Views:
24
>>Can anyone tell me the commands for sending
>>an email in VFP through the default email app
>>and navigating to a web page from withing VFP?
>
>To open the default mail editor with message addressed to a specified address:
>
>oShell = CREATEOBJECT('Shell.Application')
>oShell.Open("mailto:esmoore@flash.net")
>
>To open the default web browser and navigate to a specified page:
>
>oShell = CREATEOBJECT("Shell.Application")
>oShell.Open("http://www.levelextreme.com")
>

Just a reminder - you need at least Shell version 4.71 to use Shell.Application (the oldest versions of Win95, NT 3.51 and NT 4.0 pre-SP2 don't support the Shell.Application object, and you have to update the operating system components to get the support.)

Wscript.Shell's Run method, and the ShellExecute() or ShellExecuteEx() API calls can also launch the mailto and URL references. VFP6 has a _shellexecute class in environ.vcx in the FFC, and _urlcombobox in _internet.vcx from the FFC has a navigate method that will launch a browser and navigate to the selected page.

>If you want to create the entire email and send it without user interaction, you can use wwIPStuff, but it does not go through the default mail client, it doens't use a mail client at all: it uses wininet.dll to send the message directly to the mail server using low level windows functions.
>
>You can also look in the files section here for information about the MSMAPI control, but this control limits you to an MS client.
>
>For a lot more control over sending e-mail automatically, you should look into the Mabry mail control. I think there is a link from the front page here to download it.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform