Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Launch Default Email
Message
 
 
To
01/07/2002 10:26:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00673868
Message ID:
00673900
Views:
30
You can use ShellExecute Win Api function
DECLARE INTEGER ShellExecute ;
    IN SHELL32.DLL ;
    INTEGER nWinHandle,;
    STRING cOperation,;
    STRING cFileName,;
    STRING cParameters,;
    STRING cDirectory,;
    INTEGER nShowWindow

lcEmailAddress = "somebody@someplace.com"
lcCCAddress = "somebodyelse@someplace.com"
lcSubject = "This is a test message"
lcMessageBody = "This a message body."

ShellExecute(0, "", "mailto:" + lcEmailAddress + "?Subject=" + lcSubject + ;
                    "&CC=" + lcCCAddress + "&body=" + lcMessageBody, "", "", 1)
>I am trying to let a user click on an email address displayed in a Foxpro textbox, and have a new mail message open in the users default email.
>
>I have tried two methods so far. First I used the hyperlink object and called NavigateTo with "mailto:someemailaddress" as the cTarget.
>
>This almost works. It opens internet exloperer, then opens the new mail message.
>
>I tried using the Run command, but it doesn't seem to recognize "Mailto:".
>
>I also tried run /N explorer mailto:someemail and it opens internet explorer and the new email message.
>
>There must be a way to get the new email message without opening internet explorer.
>
>Any help would be appreciated.
>
>Thanks,
>Tim Trostle
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform