Article ID: 146641
Article Last Modified on 7/13/2004
[Mail] OLEMessaging=1And it can be found in the registry. Under Windows 95 and Windows NT 4.0 you will find it in:
HKEY_Local_Machine\SOFTWARE\Microsoft\Windows Messaging Subsystem.
*==== Beginning of OLE Messaging Program.
SESSION=CREATEOBJECT('mapi.session') && Create the MAPI object.
SESSION.LOGON && Logon to mail; With exchange it
&& will prompt for a profile.
NEW=SESSION.OUTBOX.MESSAGES.ADD && Create a new message.
NEW.SUBJECT = "Test Mail with OLE Messaging" && Add a message subject.
NEW.TEXT="Mail System Test"+CHR(13)+"using OLE!" && Actual message text.
SENDTO=NEW.RECIPIENTS.ADD && Add a recipient object
SENDTO.NAME="myemailaddr" && Email address to mail message to
SENDTO.TYPE=1 && 1= "TO:"; 2="CC:"; 3="BCC:"
SENDTO.RESOLVE && Looks up address in addressbook.
NEW.UPDATE && Required to save changes to a message object.
NEW.SEND(1,0,0) && Parameter 1 = save copy in "Sent Mail" folder.
SESSION.LOGOFF && Release the MAPI object.
*====End of OLE Messaging Program.
175052 How To Send a Message in VFP Using Active Messaging
Additional query words: MAPI OLE
Keywords: kbhowto kbinterop kbautomation kbcode KB146641