Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verify MAPIMessage.Send
Message
From
12/03/2000 10:56:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Verify MAPIMessage.Send
Miscellaneous
Thread ID:
00344712
Message ID:
00344712
Views:
54
How do I check to see if a MAPIMessage.Send is sucessful?

I have tried to check .MsgSend but I don't understand how the .MsgIndex is set to the last message sent.

Basicly I am doing the following:
ThisForm.MAPISession.SignOn
lcAppDir = SYS(5)+SYS(2003)
ThisForm.MAPISession.SignOn
WITH ThisForm.MAPIMessage
  .SessionId = ThisForm.MAPISession.SessionId
  .Compose
  .RecipAddress = "thornton@semo.net"
  .MsgSubject = "Message from Project Manager"
  IF FILE((lcAppDir + "\PjtManEr.txt"))
    .AttachmentPathName = (lcAppDir + "\PjtManEr.txt")
  ENDIF
  IF ThisForm.chkComments.Value
    .MsgNoteText = "Add your comments then press Send"
    .Send(.T.)
  ELSE
    .MsgNoteText = "See Attached Error File"
    .Send(.F.)
  ENDIF
  ** Gotta Figure out how to tell if sucessfull!
  lnAnswer = MESSAGEBOX("The Error File was sucessfully e-mailed.";
    +CHR(13)+"It is not needed by the system any more.";
    +CHR(13)+"Do you want to DELETE it now?",;
    32+0+4,"System Message")
  IF lnAnswer = 6 AND FILE((lcAppDir + "\PjtManEr.txt"))
    DELETE FILE (lcAppDir + "\PjtManEr.txt") RECYCLE
  ENDIF
ENDWITH
ThisForm.MAPISession.SignOff
SET DEFAULT TO (lcAppDir)
Next
Reply
Map
View

Click here to load this message in the networking platform