Some important points to note before using a "Before new mail arrives" triggered agents in applications (Mostly in mail in database apps or customized mail boxes). These agents are different from normal agents which are scheduled or event triggered. The differences are

1. only one agent is allowed per database.

2. This agent cannot call another agent (Cascading is not possible).

3. The maximum execution time of this agent is NOT controled by the agent execution time parameter in the server document.

4. This agent execution time is part of router setting in the server document as these agents are executed by the router not by the agent manager.

5. The default time for maximum execution is 30 seconds. The parameter can be changed (mail predelivery agent execution timelimit parameter in the router/smtp settings.) but not advisable as it will adversly impact the router performance.

3 Responses to "Before new mail arives agent"

  1. gravatar Rishi Says:

    Nice Tips Karthik.Here are some more details.

    When does it run?
    Before mail is delivered to the user's mail box
    How many documents does it operate on?
    One document
    How do you access the document that the agent is processing?
    Agent context
    Can a new document be part of a collection in the user's database?
    No
    Can a new document be located by searching the user's database?
    No
    How is the execution limit controlled?
    The "pre-delivery agent timeout" field in the "Router/SMTP" /Restrictions and Controls/Delivery Controls tab of the Configuration Settings document
    Can the agent invoke other agents?
    No
    Does the agent automatically failover?
    Yes
    Do the Agent Manager NOTES.INI settings work? (such as, AMgr_DisableMailLookup, Log_AgentManager, AMgr_NewMailAgentMinInterval, and AMgr_NewMailEventDelay)
    Not applicable
    What folder operations work?
    Restricted to one PutInFolder operation
    Do unread marks work?
    Not applicable

  2. gravatar Rishi Says:

    Same chart for "After new mail has arrived" event

    When does it run?
    After mail is delivered to the user's mail box
    How many documents does it operate on?
    All new documents since the last time it ran
    How do you access the document that the agent is processing?
    User's mail database
    Can a new document be part of a collection in the user's database?
    Yes
    Can a new document be located by searching the user's database?
    Yes
    How is the execution limit controlled?
    The "Max execution time" field in the Server Tasks/Agent Manager tab of the Server document
    Can the agent invoke other agents?
    Yes
    Does the agent automatically failover?
    No
    Do the Agent Manager NOTES.INI settings work? (such as, AMgr_DisableMailLookup, Log_AgentManager, AMgr_NewMailAgentMinInterval, and AMgr_NewMailEventDelay)
    Applicable
    What folder operations work?
    Unrestricted
    Do unread marks work?
    Applicable

  3. gravatar Maheshwaran Thirumoorthy Says:

    Hi Rishi

    Recently i have created the agent called auto forwarding the mail from cutomised mailbox to user

    but, i have faced major issue, whenever router fails, agent sending duplicate mails on multiple times

    whats is that issue?

Leave a Reply

preload preload preload