Notes error: The server is not responding

I trying to send an email through an agent. But I am getting

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

This agent is working fine in notes client. Also, iNotes Mail through web are working fine.

Code

===Dim session As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Set db = session.CurrentDatabase

Set doc = New NotesDocument( db )

doc.Form = “Memo”

doc.SendTo ="biby_j_t@hotmail.com"

doc.Subject = “Here’s the document you wanted”

Call doc.Send( false )// I tried with true also

it fails and return the previous message at Call doc.Send( false )

I have set it to run with Administrative rights. and called in webquerysave and called using ?openagent. But I am getting the same error. Please help.

Please help.

Subject: Notes error: The server is not responding.

This is frequently caused by inability of the server to resolve its own name in DNS. This can be tested by going to the server, opening a CMD window (or shell window if it is Unix) and trying to ping the server’s common name. It can be fixed in several ways. I.e., by creating the appropriate record in DNS, by fixing the DNS config on the server, or by entering the server’s IP address into the port table in the server document.