Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
E-Mailing from Visual Foxpro 5
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00095192
Message ID:
00095201
Views:
19
>Hello,
>
>I was wondering if anyone had any experiece with E-mailing from Visual Foxpro 5?? I am not looking to do anything really fancy.
>Just take a memo field, enter in an E-Mail name (roberth@buffnet.net for arguments sake) and Press [SEND] Command Button and have it go.
>
>Does anyone have any experience in doing such a task? 3rd Party
>Library Suggestions?? I've looked that the Active X Control that
>comes with Visual Foxpro (The MAPI Message Control I believe) but
>that seems to be quite a bear to figure out...
>
>Thanx,
>Bob :-)


I use the mapi messages and the mapi session controls and works fine. Is not hard to work with them. perhaps this code will help you:
mapi session control name = sesion
mapi messages control name = mensaje


this is the code tha create new message:

With thisform
with .sesion
.LogonUI = .f.
.DownLoadMail = .f.
.SignOn
endwith
With .mensaje
.SessionID = thisform.sesion.SessionID
.Compose
.MsgSubject = "ddddddd " && subject
.MsgNoteText = "eeeee" && text
.MsgReceiptRequested = .f.
.RecipDisplayName = e-mail direction
.ResolveName
.RecipType = 1
* attachments
m.nomfile = "pepe.txt" && file to attach
if file(m.nomfile)
.AttachmentIndex = .AttachmentCount
.attachmentposition = 1
.AttachmentPathName = m.nomfile
endif
.Save
.Send(.f.)
EndWith
.sesion.SignOff
.mensaje.SessionID = 0
EndWith



this is the code that definitively send messages:

With thisform.sesion
.LogonUI = .t.
.DownLoadMail = .t.
.SignOn
.SignOff
EndWith
Saludos,
A.G.P.
---------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform