Need faster trigger than 'After new mail' but can't use 'Before new mail'

I am currently linking our Domino infrastructure to some SMS software and want to be able to include addresses of the format number@sms in the SendTo of emails. The message is then sms’d to the sms addresses and emailed to conventional addresses. I’m using a router to capture the sms messages and run an ‘after new mail arrives’ agent to send the sms. The problem I have is that this trigger is too slow, and I cannot use a ‘before new mail arrives’ agent as it’s in a router and not a mailbox. Can anyone think of another way I can have some code execute on all email recipients addressed with a specified domain, as soon as it’s sent. I don’t really want to change the users mail templates if possible.

Many thanks for reading, kind regards,

Richard.

Subject: Need faster trigger than ‘After new mail’ but can’t use ‘Before new mail’

What do you mean by “it is in the router not a mailbox”? It runs on the router, but it does work as if it was in the user mail database. If you have not read the artilce called “out of the inbox” in the Agent FAQ, you might find it helpful! There is no other option for mail agents other than these two triggers. Rules work very similar to the ‘before new mail’ agents. They are executed by the router too.

Subject: RE: Need faster trigger than ‘After new mail’ but can’t use ‘Before new mail’

Thanks for the reply, sorry if my description was a bit poor.

To clarify my problem, I have to provide our users with a way to send sms messages from their mail file by specifying the mobile phone number in the SendTo field. The only sms software I have runs on our iSeries server.

What I’ve done is create a domain document in the PNAB that sends every email addressed to @sms into a specified mail-in database. This mail-in database has an agent that formats the email for sms and calls the iSeries program to send it - this works fine. The agent runs ‘when new mail arrives’, and this means there can be a longer delay than we want until the agent is triggered.

We cannot use a ‘before new mail’ agent as the emails are addressed to a different domain (@sms) and they only work for addresses within your Notes domain (I have read this on one of the forums and it seems to be the case in practice). If I had a fixed number of mobile phones to process I could put explicit entries for each in the PNAB and ‘before new mail’ agent would work fine, but this would make the system much less flexible.

I think rules are too restrictive to be able to execute a command on another server via SQL, and they may have the same restrictions as ‘before new mail’ agent. However, I will have a look at them, so many thanks for the suggestion.

Kind regards,

Richard

Subject: Need faster trigger than ‘After new mail’ but can’t use ‘Before new mail’

What do you think ybout the server mail rules to forward messages?