Sendmail refuses to send via relay

Hi

I have two realtively identical Solaris zones. They both appear to have the same config in relation to sendmail. But, when I send a test email using mailx the first one sends via a mail relay and the other sends via localhost. I need them both to use the relay but can't figure out what is causing the second one to send locally all the time.

Can anyone describe the process sendmail goes through to determine which relay to send to? DS entry in sendmail.cf? MX record in DNS? Does it have anything to do with the domain name of the email recipient?

What could be causing this problem?

Cheers

Greg