agent needed for automatic answers

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)
hreinartAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ArunkumarCommented:
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
hreinartAuthor Commented:
hi,

i tried this already.
there is no option sending attachments like screencams etc.
any other idea?
0
ArunkumarCommented:
Did you include the option - Include copy of document ?

0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

HemanthaKumarCommented:
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
hreinartAuthor Commented:
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
AntonysinghCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hreinartAuthor Commented:
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
hreinartAuthor Commented:
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
hreinartAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.