How to Include Return Receipt Functionality w/ MAPI ControlLast reviewed: June 21, 1995Article ID: Q104624 |
The information in this article applies to:
- Professional Edition of Microsoft Visual Basic programming system for Windows, version 3.0
SUMMARYThis article explains how to install return receipt functionality on a message sent in a Visual Basic application. When a message has return receipt functionality, it means that when the message you sent is opened by the recipient, a message is sent back to you to confirm that the message was opened by the recipient. The returned message typically contains the date, time, and original message subject.
MORE INFORMATIONIn Visual Basic, you can send a message by calling the automatic dialog box or by manually programming the message properties. Using the automatic dialog box, the sender can select the Return Receipt option in the Send Note dialog box. To manually program Return Receipt functionality, use the following example as a guide:
' set up a session associated with the message: Const SESSION_SIGNON = 1 mapisession1.Action = SESSION_SIGNON mapimessages1.SessionID = mapisession1.SessionID ' Send the message Const MESSAGE_SEND = 3 mapimessages1.MsgIndex = -1 ' The compose buffer mapimessages1.MsgNoteText = "How's it going?" ' The message text mapimessages1.MsgOrigAddress = "FredBloggs" ' Sender's alias mapimessages1.MsgSubject = "Hi" ' The message title mapimessages1.RecipDisplayName = "JoSmith" ' Recipient's alias mapimessages1.MsgReceiptRequested = True ' Request receipt mapimessages1.Action = MESSAGE_SEND ' Send messageBelow is the example code that traps whether Request Receipt has been set. Place this code at the point where the user reads the message.
If mapimessages1.MsgReceiptRequested Then ' Check Returnreceipt mapimessages1.MsgIndex = -1 ' Compose buffer mapimessages1.RecipDisplayName = sender$ ' Set sender toreceiver mapimessages1.MsgSubject = "RECEIVED " + title$ ' Set message title mapimessages1.Action = MESSAGE_SEND ' Send Return Receipt End IfThe variables sender$ and title$ contain the alias and the message title of the original message.
|
Additional reference words: 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |