Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook Express
Message
De
03/03/2001 09:27:57
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00481398
Message ID:
00481660
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform