Solved

Return Receipt in Script?

Posted on 2006-10-20
4
274 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 250 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 250 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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 this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
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…

617 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