>>Pete,
>>
>>The MSMAPI.MAPISession and MSMAPI.MAPIMessages components work great with OE. You have to set OE as the default Simple MAPI client. You should also get IE4.01 there were some significant bugs in file attachment handling in the IE4.0 version. The \samples\solution has a good start showing you how. Visual FoxPro 3 Unleashed has a well written section on MAPI.
>>
>>>I would like to be able to send email from VFP 5.0, I know how to do it using Windows Messaging but would like to use Outlook Express. Basically I want my users to be able to compile a message in VFP enter the email address,subject, and press go.
>
>David,
>thanks for your help, I have located the MAPI controls but find the help files unhelpful, have you any sample code ( VFP preferably ) that would demonstrate sending and receiving mail ( just the bare bones would be fine )
>Thanks again
>
>Pete
* pantalla is the form
* sesion is the mapi session control
* mensaje is the mapi message control
With pantalla
with .sesion
.LogonUI = .f.
.DownLoadMail = .f.
.SignOn
endwith
With .mensaje
.SessionID = pantalla.sesion.SessionID
.Compose
.MsgSubject = "Subject"
.MsgNoteText = "Text"
.MsgReceiptRequested = .f.
.RecipDisplayName = "recipient name"
.ResolveName
.RecipType = 1
* attachments
m.nomfile = "c:\file.txt"
.AttachmentIndex = .AttachmentCount + 1
.attachmentposition = 1
.AttachmentPathName =m.nomfile
.Save
.Send(.f.)
endWith
.sesion.SignOff
.mensaje.SessionID = 0
EndWith
Saludos,
A.G.P.
---------