Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook Express
Message
From
03/03/2001 09:27:57
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00481398
Message ID:
00481660
Views:
15
Sure just drag MAPISession and MAPIMessage onto your form from your ActiveX controls. Here is some code that e-mails me an error file using the default mail client...
LOCAL lcAppDir, lnAnswer
lcAppDir = SYS(5)+SYS(2003)
ThisForm.MAPISession.SignOn
WITH ThisForm.MAPIMessage
  .SessionId = ThisForm.MAPISession.SessionId
  .Compose
  .RecipAddress = "youraddress@isp.com"
  .MsgSubject = "Message from Project Manager"
  IF FILE((lcAppDir + "\Error.txt"))
    .AttachmentPathName = (lcAppDir + "\Error.txt")
  ENDIF
  IF ThisForm.chkComments.Value
    .MsgNoteText = "Add your comments then press Send"
    .Send(.T.)
  ELSE
    .MsgNoteText = "See Attached Error File"
    .Send(.F.)
  ENDIF
ENDWITH
ThisForm.MAPISession.SignOff
SET DEFAULT TO (lcAppDir)
>Is there a way I can send email from foxpro using Outlook ?
>
>
>Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform