Home > Domino Tips > Developer > LotusScript > Setting up return receipts for LotusScript-generated Lotus Notes email
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

Setting up return receipts for LotusScript-generated Lotus Notes email


Will Wayne
02.19.2008
Rating: -4.00- (out of 5) Hall of fame tip of the month winner


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


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.
Related resources from SearchDomino.com:
Tip: Finding and disabling hidden return receipts

Expert Advice: How can I create a rule to delete return receipt email messages?

Tip: Options for sending return receipts

LotusScript Reference Center

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.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
LotusScript
Create a non-specified date picker with LotusScript code
LotusScript accesses clipboard to view copied Notes documents
LotusScript action button manages Lotus Notes mail files
LotusScript sorts a Lotus Notes document collection
Display Lotus Notes user group membership details in a tree view
Alternate version of @Command forwards subform via LotusScript
Process large arrays in Notes forms without undue coding or testing
How to use LotusScript to modify a Lotus Notes view selection
Display a custom message box using a LotusScript-generated button
Debug Lotus Notes documents using extracted data

LotusScript
Customize the principal field of outgoing email messages
Create a non-specified date picker with LotusScript code
Resolve Notes 8 migration error: 'Database has not been opened yet'
LotusScript accesses clipboard to view copied Notes documents
LotusScript action button manages Lotus Notes mail files
LotusScript sorts a Lotus Notes document collection
Display Lotus Notes user group membership details in a tree view
Alternate version of @Command forwards subform via LotusScript
Process large arrays in Notes forms without undue coding or testing
How to use LotusScript to modify a Lotus Notes view selection

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts