Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to email an attachment
Message
De
11/05/2005 13:12:50
Howard Brown
Howard J. Brown Consulting Services Inc.
North Kingstown, Rhode Island, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
How to email an attachment
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows 2000
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01013015
Message ID:
01013015
Vues:
62
Hello all,
can anyone show me how to amend Fernando Alverez' code so that I can include an attachment with an e-mail message?
Thanks...
H Brown


oleMAPISession = CreateObject ("MSMAPI.MAPISession.1")

With oleMAPISession

.LogonUI = .T. <<<< This has been changed from .F. to .T.
.UserName = cSenderProfile <<<< The MAPI profile was used
.Password = ""

.Signon()

If .SessionID <= 0
Error <<<<
Return <<<<
endif

oleMAPIMessages = CreateObject ("MSMAPI.MAPIMessages.1")

oleMAPIMessages.SessionID = .SessionID

EndWith

oleMAPIMessages.Compose ()

oleMAPIMessages.MsgSubject = cMessageSubject
oleMAPIMessages.MsgNoteText = cMessageText

For nRecips = 1 To nRecipCount

oleMAPIMessages.RecipIndex = nRecips - 1 <<<< Had to add this
oleMAPIMessages.RecipDisplayName = TabRecipInfo [nRecips] <<<< For multiple recipients
oleMAPIMessages.RecipType = 1

oleMAPIMessages.ResolveName ()

EndFor

oleMAPIMessages.Send (.F.)
oleMAPISession.Signoff ()
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform