Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interfacing with MS Mail
Message
From
09/07/1997 12:09:40
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
 
To
09/07/1997 11:44:49
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00038407
Message ID:
00039099
Views:
41
>>>>>>Is there a way to send MS mail messages via VFP 5.0? I am totally unfamiliar with the OLE facilities, but have seen reference to a MAPI message control object.
>>>>>
>>>>>
>>>>>Klaus,
>>>>>
>>>>>You should be able to use my email.prg in the files section to implement an OLE connection to MSMail. If it doesn't work, you may consider using FOXMAPI.FLL which can be found at MS http://www.microsoft.com/kb/articles/q138/2/55.html
>>>>>
>>>>>good luck
>>>>>
>>>>>Matt
>>>>
>>>>Thanks Matt
>>>>I've printed your program, and I'm trying to understand the flow of events.
>>>>You'll have to bear with me, I'm new to Visual Foxpro.
>>>>- Just how would this procedure be fired? Would you execute EMAIL.PRG?
>>>>- How do you set up the Class Definition for the MAPI Session?
>>>
>>>Do not execute email.prg. You might use something like the following syntax:
>>>
>>>SET PROC TO EMAIL ADDITIVE
>>>
>>>... pur your email code here, build the subject, text, etc
>>>
>>>DO SendInternetMail WITH 'address@domain.com', 'your subject', 'message text'
>>>
>>>RELEASE PROC EMAIL
>>>
>>>As far as registering the Class...
>>>Select from the Tools menu...Options... and on the Controls Tab, select ActiveX Controls and make sure MS MAPI Session and Message are both selected. Make sure to hit Set As Default to be sure that you don't have to do this everytime you startup.
>>>
>>>Good luck
>>
>>Matt:
>>I have the MS MAPI session and Message selected in the Controls Tab.
>>In the command window, I
>>
>>SET PROC TO EMAIL ADDITIVE
>>DO sendinternetmail with '.....', (ALL PARAMETERS HARD CODED IN THE STATEMENT)
>>
>>Then the error "CLASS DEFINITION MAPI.SESSION IS NOT FOUND' comes up on the statement:
>>
>> loSess = CREATEOBJECT("MAPI.Session")
>>
>>Sorry to keep bothering you, but this is really cool stuff!
>> h
>
>
>Klaus,
>
>You're not bothering me, and, I can't figure it out. I can't get my system to give me that error. I unchecked the controls and set to default and restarted and I can still create the object OK, so obviously I'm missing something. Perhaps I performed a step with out knowing?? I'm quite embarrassed about this.
>
>Arnon, or anyone else, do you know what we're doing wrong?
>
>Matt

Klaus,

I have an idea...create a blank form and from the tools toolbar, select the library button (next to the arrow) and select ActiveX Controls.

You should see two buttons with envelopes. One has a key (session) and one has a paper clip and note (message). Click on each of these and create one of each on your new form. Then issue the CREATEOBJECT and see what happens.

I'm grabbing at straws here...

Matt
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Reply
Map
View

Click here to load this message in the networking platform