I agree that it would help if you post some code, but I'm going to take a stab at this anyway. I'm guessing you mean to say that the sender appears as the server it was sent from. That's a common gotcha when sending email from agents. The agent is running on the server and uses the server's context to send the email.
The fix in R5, I believe, is to sign the agent with another id. You'll have to make sure this Notes id has rights on that server to run agents and has at least designer rights to the database that holds the agent.
I'm still using R6 and there is a field in the Agent properties called "Run on Behalf Of", where you can choose a user and have the agent run in the context of that user. I can't remember if that's available in R5, but the trick above essentially yields the same result.