-
okay, what i'm trying to do is send email with attachment in VB using the MAPI controls. Here's my code:
MAPISession1.Action = 1
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Action = 6
MAPIMessages1.MsgIndex = -1
MAPIMessages1.MsgSubject = "any title"
MAPIMessages1.AttachmentPathName = sh$
MAPIMessages1.RecipDisplayName = "John Doe"
MAPIMessages1.Action = 2
Problem is, i always get "unspecified error" but when i remove the attachment everything works fine. Anybody have any ideas? please help, thanks.
-
Hi Sked,
We have 2 mapi objs - mpmMessage & mpsSession
Here is a code which works fine for us.
mpsSession.SignOn
mpmMessage.SessionID = mpsSession.SessionID
mpmMessage.Compose
mpmMessage.RecipAddress = "[email protected]"
mpmMessage.MsgSubject = "xxxxxx"
mpmMessage.MsgNoteText = "Thank you"
mpmMessage.AttachmentPathName = App.Path & "\xxx.txt"
mpmMessage.Send False
-
Does this method also work for binary files???