Likely when you're "not connected to your network" you're connected to some
other network, and your SMTP server by default isn't allowing people outside
of your network to use their server (which is as it should be).
Two things need to be in place in order for you to use your original SMTP
server from whatever your second network is:
1) Your server must support SMTP authentication
2) The second network must allow users on that network to connect to
external SMTP servers.
With regards to the first point, SMTP servers don't know who you are by
default, they only know where you're coming from, that is they see what IP
address the connection is coming from. The mail administrator configures a
list of IP addresses that are allowed to send mail to external addresses,
called "relaying". Odds are when you're on that second network the IP
address you're connecting from is NOT in that list, so you are unable to
send mail. Your test emails probably work because you're sending mail to
yourself, which is a local address on that network. That wouldn't be a
relay. Using mail.yourisp.com to send mail to (e-mail address removed) is not a
relay. Using mail.yourisp.com to send mail to (e-mail address removed) would
be a relay.
Regarding the second point you're probably not running into this issue,
since you can send test emails to yourself. I only bring it up because some
networks (such as SBC/AT&T) restrict SMTP traffic to their own SMTP server,
and drop traffic destined anywhere else. So if you were on AT&T Yahoo DSL
you could send mail using smtp.sbcglobal.yahoo.com, but not using
mail.comcast.net--AT&T's network wouldn't even allow you to connect to
Comcast's mail server directly.
My suggestion is to go into your mail settings where your incoming/outgoing
mail server are and click on the More Settings button, then click the
Outgoing Server tab. Check the box saying the server requires
authentication and try that. If that doesn't work contact the mail
administrator of the server you're trying to use to send mail and ask them
what settings (if any) to use to send mail the way you're trying to.
Joe