Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interfacing with MS Mail
Message
From
14/07/1997 14:06:15
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
 
To
14/07/1997 13:41:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00038407
Message ID:
00039865
Views:
42
>>>>>>>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
>There is an Active X control called MSMAPI.MAPIMESSAGE.
>
>I changed the command to say CREATEOBJECT("MSMAPI.MAPIMESSAGE") ,
>and it creates the object, but then I get stuck on the next command:
>
>loSess.logon()
>Because I can't see any LOGON method in this class. What do you think??
>I

logon is a method of session, not of message. I don't know why the nomenclature of your control is different. Did you try "MSMAPI.MAPISESSION"

Also, since you obviously have an OCX, check the date. Mine is 8/21/96. You may need to get an updated copy if yours doesn't have that date.

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

Click here to load this message in the networking platform