what I would do is:
1. check network first.
do telnet GMAIL.SMTP.COM 25 ,
if you can't connect, then try
ping gmail.smtp.com.
in this case , you can clearly see gmail.smtp.com is not a valid domain, so I bet it wont even work in your home ( unless you have own hosts file or dns, which I doubt), so you must rememeber it wrong. Gmail should use its own domain, so smtp.gmail.com make more sense than gmail.smtp.com,
ping smtp.gmail.com , if you see a ip, then you get one step further. if not, you have dns problem.
telnet smtp.gmail.com 25, if you can not, since you can do it from home, then you have a firewall in your company.
If you can telnet to 25 port but still can't send email, then gmail might only allow authenticated user to send out email, then you should check something like Credentials as deep_blue mentioned. ( but then why "same" code work in your home? )
1. check network first.
do telnet GMAIL.SMTP.COM 25 ,
if you can't connect, then try
ping gmail.smtp.com.
in this case , you can clearly see gmail.smtp.com is not a valid domain, so I bet it wont even work in your home ( unless you have own hosts file or dns, which I doubt), so you must rememeber it wrong. Gmail should use its own domain, so smtp.gmail.com make more sense than gmail.smtp.com,
ping smtp.gmail.com , if you see a ip, then you get one step further. if not, you have dns problem.
telnet smtp.gmail.com 25, if you can not, since you can do it from home, then you have a firewall in your company.
If you can telnet to 25 port but still can't send email, then gmail might only allow authenticated user to send out email, then you should check something like Credentials as deep_blue mentioned. ( but then why "same" code work in your home? )