Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending E-Mail via Outlook
Message
From
14/05/1998 09:14:41
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00099107
Message ID:
00099387
Views:
20
>>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.
---------
Previous
Reply
Map
View

Click here to load this message in the networking platform