Unable to send to non-local email using system.net.mail

Hi there,

I have a problem in sending email to non-local address, say: yahoo email, gmail, etc. But no problem when sending email to local address, say: sending email to myself.

I'm using the system.net.mail namespace, following the instructions from the link below:
http://weblogs.asp.net/scottgu/archive/2005/12/10/432854.aspx

I have added in the authentication in the webconfig file.

<system.net>
<mailSettings>
<smtp>
<network
host="xxx"
port="25"
userName="xxx"
password="xxx"
defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>

However, I still get an error saying: "Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server."

Thank you.
[1121 byte] By [ask4help] at [2007-11-20 8:20:04]