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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only