Hi,
I found the solution. I dont know If I am right but the following step helped me in solving it
As suggested I put some log statements in sendmail.tcl file to see
what was going wrong and then found that the line where aolserver was taking to smtp server caused the error
Helo AOLserver [ns_info hostname] //gave me the error "Invalid Domain name" But this was working on my local test server
Helo [ns_info hostname] // Did not give me the error
Now it is working fine . What I need to know now is will this change cause any problems in the future .
Thanks for the help,