i set up a test server and put a testdb on it with a scheduled agen which should just send a mail to an user on the same server
Sound easy, eh ? … probably it is, but somehow it dosn´t work here : (probably configuration issue). On the server console i´m getting this msg:
09.11.2006 13:43:32 AMgr: Agent (‘mailsend’ in ‘adressen\MailTest.nsf’) error
message: Notes error: The server is not responding. The server may be down or yo
u may be experiencing network problems. Contact your system administrator if thi
s problem persists.
This is the agent code
Dim ns As New NotesSession
Dim dbself As NotesDatabase
Dim docmail As NotesDocument
Set dbself = ns.CurrentDatabase
Set docmail = dbself.CreateDocument
docmail.sendTo = "Test User/VMDEV"
Call docmail.send(False)
The User exists, when i start that agent manually it works like a charm…
I think you may need a ‘mail-in’ document in the Domino Directory that points to your testdb.
The reason for the agent working manually is probably because you are logged in and the mail is sent on ‘your’ behalf. But when scheduled, the db is not activated for mail until you have the ‘mail-in’ document created in your Domino directory.
If you think about it, without this record when mail ‘arrives’ for this database, there is no way for Domino’s mail server to identify where to send the mail as there isn’t a proper mail address. I know you are sending mail ‘out’ but I think the mail-in document is needed for both directions.
When you send a document via an agent to a specific user listed in the same Servers Directory the server shouldn´t need a specific mail in/out db for that process. It should work as normal via the mail.box.
the question i have is, how does the agent (signed with the server id) know whch mail server to use. On my client i have an location document to tell any script, that tries to send mails, whioch server to use. But an scheduled agent ?
My understanding is that if an application or DB is sending out mail then the Domino server it sits on must have mail routing enabled. So there is no need to know which mail server to send the mail to - the ‘current server’ is used.
You can of course use the server document to then roue all mail to a specific mail server if you wish but this applies to all mail form this server and not just your DB.
If the current server is not mail enabled, then you need to set up a replica of the DB on another server. Then you will need to set the agent properties to only run on the mail enabled server. This stops the error messages on the server that is not mail enabled.