Link to home
Start Free TrialLog in
Avatar of monn
monn

asked on

How Do I Check for Unprocessed/Unread?

How Do I check for Unprocessed/unread
documents in a Mail Database?

I'm running an agent on the server and
this agent is suppose to read each and every user's mail boxes "Sent" folder mails and send it to the respective receipients.

I'm using Lotus Script in my Agent to do this. The problem is that i'm unable
to find a "Flag" to mark in all the documents that the agent has run on :(

I can't use :

"Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments"

as my db is the database which is running the agent, hence this option is off... :(

I'm using db and db1..

"Set db = directory.getfirstdatabase (DATABASE)
     
     While Not (db Is Nothing)
          If db.title = B Then
               Call db.open("","")
               Set db1 = s.getdatabase("XYZ", db.filePath)                                        
              Set view = db1.GetView("($Sent)")                            
               Set doc = view.GetFirstDocument....."                                
As you can see db1 holds the value of the respective mail box databases names. As you can see db1 uses the "getdatabase" method
hence I can't use the 'UnprocessedDocument"Property( as this is not one the getdatabase property.

Can anyone suggest another way of doing this...Pls help

Avatar of Antonysingh
Antonysingh

Hi monn,

why cann't you use

set coll = db1.unprocesseddocuments

because db1 is the mail database now and u can apply the unprocesseddocuments property.

good luck,
Antony.
Avatar of monn

ASKER

Edited text of question.
Hi monn,

why don't you just set a field on each document that you have processed? When you run through just check for this field.
Avatar of monn

ASKER

Dear Srandrews,

I'm sorry but I can't accept your answer as I'm running this on the
Domino server and on all the mails of the different users mail box.

I do not want to touch the "Memo" Form
in the database.Hence I don't wanna create an extra field in each of the mails as it might create problems later, when the user tries to open his/her mails.

Anyway thanks for your answer. Can you please suggest a solution as to use the
"UnprocessedDocument" Property, so that
I can use the in built property.

Thank you.
****************************************

Dear Antonysingh,

I got the following message when I tried using the :

"set coll = db1.unprocessedDocuments"

The message is :


"Can't get left to-do-list,
 Database XYZ!!abc.nsf is not the
 agents database"

Note :

 XYZ & abc.nsf is not the actual server
 and mail database names. I cannot put  
 the actual names for security reasons.
 Sorry. But the message is the actual
 message I got when i ran the agent.

Urgent..Pls help...
ASKER CERTIFIED SOLUTION
Avatar of maffud71
maffud71

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial