Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with MAPI
Message
From
31/07/2003 14:57:53
David Brunelle
Université de Sherbrooke
Sherbrooke, Quebec, Canada
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Problem with MAPI
Miscellaneous
Thread ID:
00815567
Message ID:
00815567
Views:
31
When I try to send a mail via MAPI, it works fine as long as I don't send an attachment. When I do, If i use the AttachmentPathName, it gives me a "Unspecified Failure has occurred" error message. If I use AttachmentName, I get the "AttachmentNotfound" error. The thing is, the file exist and I have the right path, that I am absolutly sure of this (I tried with well known file like "c:\winnt\NOTEPAD.EXE" and I get the attachment not found error).

My code looks like this :

public function sendMessage(recipient as string, mess as MapiMessage)
'the MAPI session is already open and mess.sessionID is defined too
on error goto errhandle:
mess.Compose
mess.RecipDisplayName = Trim(Recipient)
mess.AttachmentName = "text.xls"

mess.Send True
sendmessage = true
exit function

errhandle:
debug.print err.number , err.desctiption
...
exit function
end function
Reply
Map
View

Click here to load this message in the networking platform