Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interfacing with MS Mail
Message
De
15/07/1997 11:48:20
 
 
À
14/07/1997 14:06:15
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00038407
Message ID:
00040022
Vues:
38
>>>>>>>>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

Hi again! I'm getting a little farther. I copied the MSMAPI32.OCX and DEP files into VFP Base Directory.
The dates on these 2 files are both from 1997.
There is still no Prop/Method called LOGON, so I changed the line to say LOSESS.SIGNON()
This brings up the Microsoft Exchange dialog boxes, requiring that I specify mailbox libraries, and my password.
I then hang up on the line LOMSG = TOSESS.OUTBOX.MESSAGES.ADD
OLE ERROR CODE 0X80020006 Unknown name Do you have any more ideas?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform