Translation

Ads

Granjuxx
Professional IT services. Special offers for small companies Websites.
Hostnet
Hosting starting at R$9,90. Free domains. 30 days free trial.


Place your ad here.

Public audience report XHTML valid

Home

Social

Setting up return receipts for LotusScript-generated Lotus Notes email PDF Print
User Rating: / 1
PoorBest 
Written by Bruno Grange   
Monday, 26 January 2009 10:16

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

Related Articles:
 

Add comment


Security code
Refresh