?
Solved

agent needed for automatic answers

Posted on 1999-11-23
9
Medium Priority
?
212 Views
Last Modified: 2013-12-18
i need an agent who sends documents incl. attachments if a mail with a special subject arrives.

e.g a mail comes in with subject: 123 this agent should send out
the document "info for 123".

it'd be good to have multiple choices (more than i subject can be
used)
0
Comment
Question by:hreinart
9 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 2228544
You can create an agent in the mailbox with simple actions to accomplish this task.

Agent Name - "Name of the Agent"

When should this agent run ? -
If new mail has arrived.

Add Search - In the search Builder - Select By Field - Subject.

Select Contains - Fill in the next field with your message to search.

Now you have one condition to search on.
Do the same procedure to addmultiple conditions with an AND operator (This gets added automatically when you add your conditions).

NOW,

Add Action - A button at the left botton of the screen.

Select the "Send mail message".

Fill out the other options.  Its fairly simple to do this.

Save this agent and wait for the new mail with the desired subject.

Good Luck !

:)
Arun

0
 

Author Comment

by:hreinart
ID: 2228594
hi,

i tried this already.
there is no option sending attachments like screencams etc.
any other idea?
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 2228613
Did you include the option - Include copy of document ?

0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2228707
Hi

Seems to be cool task.

Here is the answer to it.

Create an agent which runs on the newly mailed documents

In the script collect the unprocessed documents and search for the subjects stored in a profile document created for admin purpose( this should be maintained by you so that in future if subject changes u can edit the profile document for the new entries )& forward the document with the desired subject on it.

Good Luck
Hemanth

0
 

Author Comment

by:hreinart
ID: 2230769
sorry to reject your answer.
generally you're right. but i posted this request because i can't write this stuff. i know that writing this kind of script would work, but i'm looking for someone who may did this already. or a tool which might do this. can you write it?
0
 
LVL 2

Accepted Solution

by:
Antonysingh earned 800 total points
ID: 2233370
Hi hreinart,

Here is the agent to send reply to all document that matches the given subject.

To generalize the code you need to create one form and one view. There are to hold the subject which you want to search.

1. create a form with field say "Subject_search". Don't give field name as "subject". Otherthan "Subject" you use any name for the field. And give any name to the form.

2. Create a view to hold the document which contain subject to be search. In selection formula use Form = "Form name given in point 1"

Create document(s) with subect to search. This agent will get the subject from this document and search for those documents, if found send reply. This is just like master view for the subject.

Create schedule angent to run on All new and modified document since last run and in the initialize event write the following script.
Declaration Part
      Dim session As New notessession
      Dim db As notesdatabase
      Dim doc As notesdocument
      Dim subdoc As notesdocument
      Dim subview As notesview
      Dim substr As String
      Dim coll As notesdocumentcollection
      Dim memo As notesdocument
      Set dt = New notesdatetime("01/01/80")
      
      'Get the database
      Set db = New notesdatabase("servername" , "databasename")
      
      'Get Master subject (subject to be searched) view and document
      Set subview = db.getview("Master Subject viewname")
      Set subdoc = subview.getfirstdocument
      
      'While loop to get all the subjects
      While Not subdoc Is Nothing
      'change the field name Subject_search if you have different field name.
      substr = subdoc.Subject_search(0)
            
            'Query to search for the subject
            qry =       "Subject = '"+substr +"'"
            
            'Collect the matching documents in document collection
            Set coll = db.search( qry , dt , 0)
            
            'For loop to send reply to all documents that matches the subject
            For i = 1 To coll.count
                  Set  doc = coll.getnthdocument(i)
                  Set memo = db.createdocument
                  Call doc.replaceitemvalue("form", "Memo")
                  
                  'Create reply
                  Set memo = doc.CreateReplyMessage( False  )
                  memo.form = "Reply"
                  memo.Subject = "Re:" + doc.Subject(0)
                  
             'Send the reply                  
                  Call memo.send(True)
            Next
            Set subdoc = subview.getnextdocument(subdoc)
      Wend


Good luck,
Antony.
0
 

Author Comment

by:hreinart
ID: 2240363
hi,

thanks this worked very well.
one addtional question:

if no special subject is requested
(a mail arrives with subject e.g. "please send me infos about...")
could this agent sent 1 predefined document?

it could work e.g. this way:
if the subject is not found subject=info. then the info document will be replied.


thanks again
hreinart
0
 

Author Comment

by:hreinart
ID: 2240378
hi,

thanks this worked very well.
one addtional question:

if no special subject is requested
(a mail arrives with subject e.g. "please send me infos about...")
could this agent sent 1 predefined document?

it could work e.g. this way:
if the subject is not found subject=info. then the info document will be replied.


thanks again
hreinart
0
 

Author Comment

by:hreinart
ID: 2240607
hi,

i discovered a problem. when a mail with e.g subject 123 arrives a reply with
"re: 123" is sent.

but the document "123" which contains the information is not sent back. it's just a plain mail as a reply with no content.

what can i do?


best regards
hreinart
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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.
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…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Suggested Courses

599 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