The return receipt feature allows the sender of an email to be notified when the recipient opens the document.
How It Works
The ReturnReceipt field is a default field included in the default Lotus Notes mail template. When this field is set to 1, the sender will be notified when the email has been opened for the first time. After it is opened, the Lotus Notes mail template will automatically set a flag on the email to signify that the return notification has been triggered.
The following illustrates how to implement this feature in LotusScript-generated email. In this example, an email is sent to the person that clicks the button. The return receipt is generated after the email is opened in Lotus Notes. Note that no return receipt is generated if the sender and receiver are the same person.
Sub Click(Source As Button) Dim s As NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Set s = New NotesSession Set db = s.CurrentDatabase Set doc = New NotesDocument(db) '---------------------------------------------------------------------- ' Create the memo header '---------------------------------------------------------------------- Dim Person As NotesName Dim rtitem as NotesRichTextItem Set Person = New NotesName(s.UserName) doc.Form = "Memo" doc.SendTo = Person.Abbreviated ' doc.SendTo = "john doe/org/company" doc.Subject = "This is the message subject" doc.ReturnReceipt = "1" '---------------------------------------------------------------------- ' Create the email message body '---------------------------------------------------------------------- Set rtitem = New NotesRichTextItem(doc, "Body") Call rtitem.AddNewLine(1) Call rtitem.AppendText("This is the body of the email message.") Call rtitem.AddNewLine(1) '---------------------------------------------------------------------- ' Send the email notification '---------------------------------------------------------------------- doc.Send (False) msgbox "An email has been sent." End Sub
Note
In addition to the SendTo field, you can also set the CopyTo and BlindCopyTo fields.
An Introduction to the Lotus Domino Tool Suite
Getting Started with Designer
Navigating the Domino Designer Workspace
Domino Design Elements
An Introduction to Formula Language
An Introduction to LotusScript
Fundamentals of a Notes Application
Calendar Applications
Collaborative Applications
Reference Library Applications
Workflow Applications
Web Applications
Design Enhancements Using LotusScript
Design Enhancements Using Formula Language
View Enhancements
Sample Agents
Miscellaneous Enhancements and Tips for Domino Databases
Data Management
Security
Application Deployment and Maintenance
Troubleshooting
Appendix A. Online Project Files and Sample Applications
Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?