db sh 11.Jun.12 04:06 PM a Web browser Applications Development7.0.3 FP1All Platforms
Hii all ..
i have written some code in agent which is working on mailbox this mailbox is not mine.. for testing purpose i am taking some testmailbox) then this agent working on when its schedule more than a day or daily.. and manually its working fine but its not working when "After new mail has Arrived" is selected in agent property .. dont know why its happening.. My code is here
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim unprocessedDocs As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set unprocessedDocs = db.UnprocessedDocuments
If unprocessedDocs.Count = 0 Then
Exit Sub
End If
Set doc = unprocessedDocs.GetFirstDocument()
Do While Not (doc Is Nothing)
if doc.INetFrom(0) Like "*XYZ@domain.com*" then
Call doc.PutInFolder( "Closed" )
Call doc.Removefromfolder("$Inbox")
End If
Call session.UpdateProcessedDoc( doc )
Set doc = unprocessedDocs.GetNextDocument(doc)
Loop