Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Return Receipt in Script?

Posted on 2006-10-20
4
Medium Priority
?
275 Views
Last Modified: 2013-12-18
Have a formatted email that goes out inviting user to a hardware offer, is there a way to add a return receipt in LS to the code below. I see that it is an option in @MailSend, but cannot find it in any LS.

Joe

Sub Initialize
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim emaildoc As NotesDocument
      Dim Item As NotesItem
      Dim twoliner As String
      Dim rtitem As NotesRichTextItem
      Dim sNamesArr(1)As String
      Dim sNamesArrB(1)As String
      Dim installDate As NotesDateTime
      Dim installTimeItem As NotesItem            
      Set db = session.CurrentDatabase
      Set col = db.UnprocessedDocuments
      Set doc = col.GetFirstDocument
      On Error Resume Next
      While Not doc Is Nothing
            If doc.invited_flag(0)<>"done" Then
                  Set emaildoc = db.CreateDocument
                  
                  emaildoc.form = "bb_invite" 'Form name of Letter
                  emaildoc.SendTo = doc.EE_Name(0)
                  emaildoc.CopyTo = "Field Technology"
                  emaildoc.BlindCopyTo = doc.bcc
                  emaildoc.Principal = "Field Technology"
                  emaildoc.Subject ="BlackBerry offer extended to " +  doc.EE_Name(0) + "!"
                  emaildoc.EE_Name = doc.EE_Name
                  Set rtitem = New NotesRichTextItem(emaildoc, "Doclink")
                  Call rtitem.AppendDocLink(doc, "")
                  Call emaildoc.Send(True)
                  doc.invited_flag = "done"    'field name for flag
                  doc.status = "Offer Sent"
                  Call doc.Save(True,True)
            End If
            Set doc = col.GetNextDocument(doc)
      Wend
End Sub
0
Comment
Question by:jforget1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:jforget1
ID: 17776029
Also this button is in a view, how can I tweak this to send for the tagged(checkmark) items and not just the one that is selected with the box around the entry. It only sent the one that was selected and not the 2 that were tagged. Trying to think in the case where this is run by an action where that option comes into play.
0
 
LVL 20

Accepted Solution

by:
brwwiggins earned 1000 total points
ID: 17777092
it's just another field to set in the document that you can set

emaildoc.ReturnReceipt="1"

As for the other part, you have to get the document collection from the notesuiview.documents property and loop through them
0
 
LVL 63

Assisted Solution

by:SysExpert
SysExpert earned 1000 total points
ID: 17777234

for selected docs
Dim col As NotesDocumentCollection ' Local only
   Set col = currentDb.unprocesseddocuments
      
      For x = 1 To col.count
            
            Set doc = col.getnthdocument(x)
       Next  ' Doc in Col

  More efficient for large colections is firstdoc and then nextdoc.

I hope this helps !
0
 

Author Comment

by:jforget1
ID: 17789278
Is the placement of the code proper for what I am trying to do here?

Sub Initialize
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim emaildoc As NotesDocument
      Dim Item As NotesItem
      Dim twoliner As String
      Dim rtitem As NotesRichTextItem
      Dim sNamesArr(1)As String
      Dim sNamesArrB(1)As String
      Dim installDate As NotesDateTime
      Dim installTimeItem As NotesItem            
      Set db = session.CurrentDatabase
      Set col = db.UnprocessedDocuments
      Set doc = col.GetFirstDocument
      On Error Resume Next
      Dim col As NotesDocumentCollection ' Local only
      Set col = currentDb.unprocesseddocuments
      
      For x = 1 To col.count
            
            Set doc = col.getnthdocument(x)
      Next  ' Doc in Col
      While Not doc Is Nothing
            If doc.invited_flag(0)<>"done" Then
                  Set emaildoc = db.CreateDocument
                  
                  emaildoc.form = "bb_invite" 'Form name of Letter
                  emaildoc.SendTo = doc.EE_Name(0)
                  emaildoc.CopyTo = "Field Technology"
                  emaildoc.BlindCopyTo = doc.bcc
                  emaildoc.Principal = "Field Technology"
                  emaildoc.Subject ="BlackBerry offer extended to " +  doc.EE_Name(0) + "!"
                  emaildoc.EE_Name = doc.EE_Name
                  emaildoc.ReturnReceipt="1"
                  Set rtitem = New NotesRichTextItem(emaildoc, "Doclink")
                  Call rtitem.AppendDocLink(doc, "")
                  Call emaildoc.Send(True)
                  doc.invited_flag = "done"    'field name for flag
                  doc.status = "Offer Sent"
                  Call doc.Save(True,True)
            End If
            Set doc = col.GetNextDocument(doc)
      Wend
End Sub
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question