LotusScript agent not sending email

All,

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

End Sub

Thanks for your help,

Ki

Subject: Does it work manually? Is the agent signed by the Server’s ID?

Subject: RE: Does it work manually? Is the agent signed by the Server’s ID?

Thanks for your response. Yes when I run it manully the email is sent. But when I run it through a web querysaveagent it doesnt. Any suggestions.

Ki

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?

Tried that but it didnt work either. The agent is signed by my id.

Ki

Subject: RE: Does it work manually? Is the agent signed by the Server’s ID?

Okay! Are you set up in the Server document to be able to run restricted/unrestricted agents? Serverdocument/SECURITY tab.

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.

TIA

Ki

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: RE: Does it work manually? Is the agent signed by the Server’s ID?

Yes I have tried with both the ids. None worked. Any other idea. Thanks for your responses.

Ki

Subject: Look at Bill’s response, I believe he’s on the right track.

Subject: Typically that is a DNS error. The server can not “Ping” itself.

Either fix the DNS or add an entry to the servers Hosts file for itself.111.222.111.222 ServersCommonName

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.

Hope this helps.

Subject: Your code is fine; I tested and it works fine scheduled and signed by the server’s id.