There's a requirement of autoforwarding of mails from one notes mailing database to some external mail address when a new mails comes in mailing database.
I have created an agent for this which is forwarding new mails.
Dim db As NotesDatabase
Dim Maildoc As NotesDocument
Dim doccoll As NotesDocumentCollection
Dim forwardDoc As NotesDocument
Dim a As Integer
Print "agent started runing"
Print "agent runnning for " doccoll.count " documents"
For a=1 To doccoll.count
Set Maildoc = New NotesDocument( db )
Call forwardDoc.CopyAllItems( Maildoc, True )
Maildoc.Principal = forwardDoc.From(0)
Agent is trigered on event "when a new mail has arrived"
But agent is only running for one time .
means intaily when database has no mails i have pasted some documents in it.
it works for one time .
After this again i have pasted some document .So the agent should run but its not working?