[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to make copy of incoming mail go to other users

Posted on 2000-05-02
5
Medium Priority
?
196 Views
Last Modified: 2013-12-18
I need to know how to construct an agent that will look in my mail file (even at unread messages) for a certain "Subject" string. When it see's it, it forwards a copy of the incoming message to 5 other Notes users mail files. This agent would obviously need to know if it has forwarded these messages already or not.
0
Comment
Question by:a6106a
[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
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
Simon_Hendry earned 400 total points
ID: 2771653
I shouldn't really give you this for only 60 points , but I am in a good mood today so ...

Create an agent called anything you want in your mail file.. And set it to run when "If New Mail has Arrived"

In the Initialize event of the agent put::

'Code Starts

    Dim Sess As New NotesSession
     Dim CurrentDoc As NotesDocument
     Dim MemoDoc As NotesDocument
     Dim ThisDB As NotesDatabase
     Dim Coll As NotesDocumentCollection
     Dim Body As NotesRichTextItem
     Dim i As Integer
     Dim YourName As NotesName
     Dim Recp(1 to 5) As String

     Recp(1) = "UserName1/Domain"
     Recp(2) = "UserName2@Domain.com"
     Recp(3) = "UserName3/Domain"
     Recp(4) = "UserName4/Domain"
     Recp(5) = "UserName5/Domain"

     Set ThisDB =  Sess.CurrentDatabase
     
     ' Get all of the newly recieved documents
     
     Set Coll = ThisDb.UnprocessedDocuments
     Set YourName = New NotesName(Sess.EffectiveUserName)
     
     For i = 1 To Coll.Count
         
          Set CurrentDoc = Coll.getnthdocument(i)
         
          If CurrentDoc.Subject(0) = "THE SUBJECT YOU ARE LOOKING FOR" Then
               
               Set MemoDoc = New NotesDocument(ThisDB)
               Set Body = MemoDoc.CreateRichTextItem("Body")
               Call Body.AppendText("----------- Auto Forwarded by " + YourName.Common + " ----------------")
               Call Body.AddNewLine(2)
               Call CurrentDoc.Rendertortitem(Body)
               MemoDoc.Form="Memo"
' Adjust the subject a little so if you forward it to yourself for some reason it does create a loop
               MemoDoc.Subject = CurrentDoc.Subject(0) + "."
               Call  MemoDoc.Send(False,Recp)
               
          End If
         
          Call Sess.UpdateProcessedDoc(CurrentDoc)
         
     Next i
     

' Code Ends

Change the "THE SUBJECT YOU ARE LOOKING FOR" to the subject you referred to in your question and setup the Recp(1 to 5) with the list of users you want..

Hope this helps !!
0
 

Author Comment

by:a6106a
ID: 2774424
Simon:
I will contstruct all this and let you know. If all goes well, since I am in a good mood, I'll up to 100 points.
bob
0
 

Author Comment

by:a6106a
ID: 2776613
Adjusted points from 60 to 100
0
 

Author Comment

by:a6106a
ID: 2776614
fine job.
Thanks..
0
 
LVL 3

Expert Comment

by:Simon_Hendry
ID: 2776628
Thanks ...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

656 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