Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Create An Outlook Mail Message From Within VFP6.0
Message
From
08/03/2000 00:17:10
 
 
To
07/03/2000 23:30:52
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00343120
Message ID:
00343137
Views:
27
>Hi All,
>
> Is there an easy way to create an outlook email from within VFP6.0 and populate the 'To', 'Subject' and the message body ( similar to the 'Send To' option in Word or the 'mailto' option in HTML ).
>I don't want the eMail to be automatically sent, I just want the eMail to be created and the user will then send it.
>
>Thanks,
> Gavin...

Depending on how much control you need, you can either use MAPI to do this, or ShellExecute. SHellExecute will allow you to fill in the recipient and subject, but that's all. The advantage to the ShellExecute method is its simplicity and portability- the user doesn't have to have any particular mail reader, it just fires up the default mail program.

DECLARE Integer ShellExecute IN Shell32.dll LONG, STRING, STRING, STRING, STRING, LONG
?ShellExecute(0,"Open","mailto:esmoore@texas.net?subject=howdy","","",0)

To get complete control over the message you need to use MAPI. MAPI requires that the user have an MS or other MAPI compliant mail program, and is considerably more involved than ShellExecute. I highly recommend that you down;oad Nigel Coates' excellent MAPI class from here in the files section to see how it works.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform