I have created a foreign domain, called “SMTPPage”, and setup the Gateway mail file name is set to smtppapp.nsf, an application that sends out pages.
Now the deal is this, when a new document is mailed into this application, it is supposed to be processed by an agent. The agent is called “New Mail Trigger”, and the only thing this agent does is run the following code.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim agentLog As New NotesLog("Agent log")
Dim agent As NotesAgent
Set db = session.CurrentDatabase
Set agent = db.GetAgent( "(Trigger Send Page)" )
Call agentLog.OpenAgentLog
Call agentLog.LogAction( "About to call Trigger Send Page" )
Call agent.Run 'The sole purpose of this agent is to run this line, which runs the Trigger Send Page agent
Call agentLog.LogAction( "Just called Trigger Send Page" )
Call agentLog.Close
End Sub
Here is how (for one brief day) this application worked. People and applications would send mail to specific addresses that were routed to the foreign domain “SMTPPage”. They would be routed to my smtppapp.nsf. When the new mailed, my agent would kick off within minutes and run the “(Trigger Send Page)” agent. When this was first set up, I was actually able to run “tell amgr sched” and actually watch agent manager recognize the mail delivered, schedule the “New Mail Trigger” agent, and run it. It was beautiful.
Now, I am depths of despair. It has stopped working, and I do not know why.
When I run it manually, it works perfectly. The new mail trigger agent calls the other agent, pages are processed, and cell phones and text pagers start buzzing all around the country.
When I run it manually I get this:
Started running agent ‘New Mail Trigger’ on 05/15/2005 05:33:37 PM
Running on new mail messages: 0 total
Found 0 document(s) that match search criteria
05/15/2005 05:33:46 PM: About to call Trigger Send Page
05/15/2005 05:33:47 PM: Just called Trigger Send Page
Ran LotusScript code
Done running agent ‘New Mail Trigger’ on 05/15/2005 05:33:47 PM
When I “Test” the agent, the result was this…
The following will occur when this agent is run:
‘CN=Jason Freis/O=wfstestnotes’ has unrestricted rights to run LotusScript/Java agents on ‘CN=wfstestnotes1/O=wfstestnotes’.
Allow restricted operations flag is de-selected in this agent. Restricted operations will be disallowed.
Agent will be run by the Agent Manager after new mail messages are delivered.
Home mail server for ‘CN=Jason Freis/O=wfstestnotes’ is ‘CN=wfstestnotes1/O=wfstestnotes’.
Started running agent ‘New Mail Trigger’ on 05/15/2005 05:13:30 PM
Running on new mail messages: 0 total
Found 0 document(s) that match search criteria
Testing: Ran LotusScript code
Done running agent ‘New Mail Trigger’ on 05/15/2005 05:13:39 PM
Does anyone have any suggestions as to how this agent would begin to run when new mail was delivered???
Here is what I have tried:
-
Restarted agent manager
-
Restarted the server