Solved

Return Receipt in Script?

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

  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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

17 Experts available now in Live!

Get 1:1 Help Now