Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't send attachment file use MAPI
Message
From
21/11/2001 01:39:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Can't send attachment file use MAPI
Miscellaneous
Thread ID:
00584334
Message ID:
00584334
Views:
62
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
Next
Reply
Map
View

Click here to load this message in the networking platform