It could be a relay issue as another user pointed out.
is bad. It would allow anyone to
send a message through your SMTP port. To prevent this
the SMTP server is going to verify that either the 'sender'
or the 'to' is a valid user (this can be more or less strict
depending on your SMTP server configuration).
So in this case when you send an email message with a
"to" and "from" that are not hosted by your SMTP server
it is rejected for processing.
I could be completely wrong, but I have been bitten by this
in the past.