Application to replay through Exchange 2007

I have a developer who using Ruby on Rails to develop application for our company. I'm work as Exchange admin. The developer will develop an application (intranet) which will trigger email and relay via our exchange 2007, so that staff able to receive email from intranet. Currently we having problem with sending mail portion. The developer usinf Action Mailer like below:

Address = smtp.domain.com User_name = test@domain.com Password = xxxx domain = domain.com

Every time, this application try to relay email, it will show an authentication error. The develope show the error to me. From exchange side, I'm already trusted the application IP address to allow it relay email.

May some body help on this, since I'm not famaliar with ruby.

Actually they try using this: