Solved

Return Receipt in Script?

Posted on 2006-10-20
4
265 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How many GB is a good number to keep these databases? 6 174
Lotus Notes 8.5 1 140
SQL Server linked server to Lotus notes 3 456
Lotus Domino Server 9 4 82
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now