Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't send attachment file use MAPI
Message
De
21/11/2001 01:39:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Can't send attachment file use MAPI
Divers
Thread ID:
00584334
Message ID:
00584334
Vues:
64
Hi,
I face problem to send the attachment file use MAPI. My default mail handler is Outlook Express. It gave me the error message :
OLE |Dispatch exception code 0 from MAPIMessage:
Unspecified Failure has occurred.

Below is my code :
oleMAPISession = createobject( "MSMAPI.MAPISession.1" )

* Signon to mail
with oleMAPISession
.UserName = "Mr Right"
.Password = ""
.Signon()
* Check the SignOn status
if (.SessionID > 0)
oleMAPIMessages = createobject( "MSMAPI.MAPIMessages.1" )
* tell the message the SessionID
oleMAPIMessages.SessionID = .SessionID
else
return
endif
endwith

* Send an email
with oleMAPIMessages
.Compose()
* Set the Recipient name and resolve
.RecipDisplayName = "abc@yahoo.com"
.RecipType = 1
.ResolveName()
.MsgSubject = "Testing"
.MsgNoteText ="Hello dear"
.AttachmentName="error.log"
.AttachmentPathName="C:\"
.send(.f.) <---- debug stop at here
endwith

* Signoff
oleMAPISession.Signoff()


Anyone can find the problem for me thanks....

kengwen
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform