Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to email an attachment
Message
 
 
À
11/05/2005 13:12:50
Howard Brown
Howard J. Brown Consulting Services Inc.
North Kingstown, Rhode Island, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows 2000
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01013015
Message ID:
01013210
Vues:
13
Check MAPI Mail Class File #9524. You can use it "AS IS" or pull code that handles attachments from it.

>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 ()
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform