I have created an email from MSMapi.message. Code looks like:
with thisform.message1
.SessionID = lnSessionID
.Compose()
.AddressResolveUI = .f.
.MsgSubject = "Test Send"
.MsgNoteText = " Just some Text here "
.RecipAddress = "
srussell@dstinc.com"
endwith
the help file gets pretty flaky on what flag to alter so an attachment can be made.
It says to bump up the Attachment Index
Thisform.message1.AttachmentIndex = thisform.message1.AttachmentIndex +1
It says that the msgindex must be -1. This line and the next always error:
wait wind str(thisform.MsgIndex)
If thisform.MsgIndex = -1 && we blow up here
If file('c:\myfile.new')
Thisform.AttachmentName = 'c:\myfile.new'
Endif
Endif
Thisform.message1.Send()
Wait window nowait "Message sent..."
Endif && vartype(thisform.message1) = "O"
Thisform.session1.SignOff()
Any ideas here?
TIA
__Stephen