I have a simple lotusscript agent to send an email but its not sending the mail. When I check the log I get the following error.“01/31/2005 03:23:38 PM Agent ‘Test’ error: Notes error: The server is not responding. The server may be down or you may be experiencing network problems. Contact your system administrator if this problem persists.”
I think its something to do with my rights. Can somebody tell me where do in the Administrator I give myself rights so that my script agent sends email.
My test script is:
Sub Initialize
Dim Session As New NotesSession
Dim db As NotesDatabase
Set db=Session.CurrentDatabase
Dim doc As NotesDocument
Set doc=Session.DocumentContext
Dim memo As NotesDocument
Dim rtitem As NotesRichTextItem
Set memo = New NotesDocument(db)
memo.Form = "Memo"
memo.Subject="Your request"
Set rtitem = New NotesRichTextItem (memo, "Body")
Call rtitem.AppendText("You request has been rejected")
memo.SendTo = "Tony Key"
Call memo.send (False)
Exit Sub
Subject: RE: Does it work manually? Is the agent signed by the Server’s ID?
How are you calling the agent in the webquerysave event? If you’re not using @Command( [ToolsRunBackgroundMacros]; “agent name”), could be your problem!!
Subject: RE: Does it work manually? Is the agent signed by the Server’s ID?
Iam listed in restricted but not in unrestricted. Do I have to be in both of the above. As soon as I add myself in the unrestricted section I cant even open the form on the web.
Subject: RE: Does it work manually? Is the agent signed by the Server’s ID?
I’d recommend you be in both; however, I don’t believe that is the problem in this case. It appears (from the error) to be a connection issue and not a permission issue.
You did try signing the agent with the server’s id, correct?
Subject: If an Agent send email from a client but not as a background then
I have found that the problem is that generally that the server that is running the agent has no way of knowing how to send the email. When you run it manually the code will use your Location document to determine what server to use as the mail server. When it is run as a background agent there is no location document to be used so it must use the values from teh servers Notes.INI. The Notes.ini needs a lineMailServer=“The Mail Server Name”
even if it is the server that the agent is being run on. So if the Agent is running of “Web Server/Your Org” and the Mail Server is “MailServer/Your Org” then the Notes.ini on the web server would need the line :
MailServer=MailServer/Your Org
I have run into this on a fair number of servers and it can be pretty perplexing.