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, Domino, Workplace and WebSphere tips and advice
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
LotusScript equivalent of @Picklist for Lotus Notes
Launch large attachments within an email from a Notes database
How to find files on a hard drive or mapped network with LotusScript
Update the ACL from the Roles view with LotusScript
LotusScript agent moves tagged spam email to junk mail folder
Create a personalized greeting for Lotus Notes database users
Fail-safe rich-text validation using LotusScript
How to export Lotus Notes views to a Microsoft Excel database
Create file system labels for Microsoft Excel and Word mail merges
Fix Lotus Notes 8.0 issues when launching Microsoft Office applications

LotusScript
LotusScript equivalent of @Picklist for Lotus Notes
Launch large attachments within an email from a Notes database
How to find files on a hard drive or mapped network with LotusScript
Update the ACL from the Roles view with LotusScript
LotusScript agent moves tagged spam email to junk mail folder
Set a value in a field existing in another Lotus Notes database
Create an automatic scheduled view export in Excel
Top 10 LotusScript tips
Create a personalized greeting for Lotus Notes database users
Fail-safe rich-text validation using LotusScript

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.

HomeNewsTopicsITKnowledge 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