I don't think it will work with outlook. With CDO you communicate directly through the SMTP protocol to bounce an e-mail off to a destination. For Outlook, I would look at creating a connection to Outlook which will allow you to manipulate any part of Outlook. Outlook 2003 I noticed prompts about activity and verifies that the activity is to be done on your behalf.
Below is an example of using Outlook. It has a form that asks for the To, Subject and Body. The attachment was created before the form was called and had it passed to it.
oOutlookObject = CREATEOBJECT("Outlook.Application")
oEMailItem = oOutlookObject.CreateItem(0)
WITH oEMailItem
.To = THISFORM.txtTo.VALUE
.Subject = THISFORM.txtSubject.VALUE
.Body = THISFORM.edtMessage.VALUE + CHR(13) + CHR(13)
IF THISFORM.txtNumAttachments.VALUE > 0
.Attachments.Add(THISFORM.Attachment1)
ENDIF
.Send
ENDWITH
RELEASE oEMailItem
RELEASE oOutlookObject
Microsoft has information with OLE (old term). A lot of the information is for VB, but not too bad on translating it to VFP.
Thanks,
Warren Murphey
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement