Manage Learn to apply best practices and optimize your operations.

Setting up return receipts for LotusScript-generated Lotus Notes email

Discover how to implement the Lotus Notes return receipt feature for LotusScript-generated email messages.

The Lotus Notes return receipt feature allows the email sender to be notified when the recipient opens the sent document. The LotusScript code in this tip shows how to implement this feature in a LotusScript-generated email message.

The ReturnReceipt field is a default field included in the default Lotus Notes mail template. When this field is set to "1," the Lotus Notes sender is notified when an email message has been opened for the first time. After it is opened, the Lotus Notes mail template automatically sets a flag on the email to signify that the return notification has been triggered.

In my example below, an email is sent to the Lotus Notes user that clicks the button. The return receipt is then generated after the email is opened in Lotus Notes.

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

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Will Wayne. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

This was last published in February 2008

Dig Deeper on LotusScript

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

I am sending emails from Lotus notes action using agent (doc.ReturnReceipt = "1") to gmail expecting Return receipt but I am not receiving any return receipt message when mail is opened in gmail. Could you please let me know if there is any attribute I need to add my lotus script agent to receive the return receipt from gmail?
Cancel

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close