OpenNTF.org - Set email replies as responses
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
Set email replies as responses 
Rating:
Not Rated Yet 
Contributor:
John Smart 
Category:
Lotusscript 
Type:
System info 
Document Release:
Notes Version:
R5.x, R6.x 
Last Modified:
20 Dec 2002 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
When email is received in a mail-in database via the internet, it shows up as a Memo document.


This code snippet detects such an email and, if it is actually a reply to an existing document in the database, sets it up as a response document using a Reply form.

    sParentUNID = Doc.In_Reply_To(0)
    If Len(sParentUNID) <> 0 Then
%REM
Doc.In_Reply_To(0) is something like
 <OF5E15E355.0D974D6C-ON86256C94.006FF003-86256C94.006FFE2F@whatever.com>
We need
 5E15E3550D974D6C86256C94006FF003
%END REM
     sParentUNID = Mid$(sParentUNID, 4, 8) + Mid$(sParentUNID, 13, 8) + Mid$(sParentUNID, 24, 8) + Mid$(sParentUNID, 33, 8)
     Set ParentDoc = Db.GetDocumentByUNID(sParentUNID)
     If Not ParentDoc Is Nothing Then
      Doc.Form = "Reply"
      Call Doc.MakeResponse(ParentDoc)
      Call Doc.Save(False, False)
     End If
    End If

Usage / Example
Great for email databases (such as a shared mail-in db for customer support) where the Discussion Threads view is otherwise rendered useless because replies are not turned into response documents.
 Comments

No documents found

 Add your comment!