I am in search of a document that would describe all of the OLE Messaging syntax. The application I wrote in Visual FoxPro 5.0 requires to make use of Outlook 97 to send email.
Here's how I'm currently using OLE Messaging...
SESSION=CREATEOBJECT('mapi.session') && Create the MAPI object
SESSION.Logon("Microsoft Outlook") && Logon using profile
NEW=SESSION.OUTBOX.MESSAGES.ADD && Create a new message
NEW.SUBJECT = "Subject goes here" && Add a message subject
NEW.TEXT="Body of message goes here" && Actual message text
SENDTO=NEW.RECIPIENTS.ADD && Add a recipient object
SENDTO.NAME="Recipient's name" && Email address to mail message
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
The line NEW.SEND(1,0,0) saves and deliver's the message immediately. I found that replacing it with NEW.SEND(1,1,0) opens a window containing the message. It allows me to change its content and modify recipients information.
What I'm looking for is a document that describes the syntax for all OLE Messaging methods and properties. What are the parameters in the SEND Method?
For example if I use NEW.SEND(1,1,0) and I exit the "edit message" window without sending the message, the message is saved in the outbox but not sent. How can I make my application aware of the fact that the email was sent or not?
What other methods and properties are accessible using Visual FoxPro 5.0...for example, I would like to be able to specify the font of the message text...
Any help would be appreciated,
Thanks,
Bruno Di Lalla
bdl@magi.com
Bruno Di Lalla
Consultant
BDL Computer Consulting