Check this link!
It worked for other users, if it doesn't work, Check the firewall settings on server!
Try to run this code in a sample snippet, there must be something from the network which might be preventing your code to send an email.
As Marco suggested, try to ping "smtp.google.com" from server to check if server allows access to smtp.
Answer of 2nd question:
If you want to use the code for other SMTP Clients, then you can change the SmtpClient settings as SmtpServer name and port. :)