That's because you cannot connect the smtp.gmail.com 587
$ telnet smtp.gmail.com 587
Trying 209.85.147.109...
Trying 209.85.147.111...
telnet: Unable to connect to remote host: Connection timed out
$ telnet smtp.gmail.com 587
Trying 209.85.147.109...
Trying 209.85.147.111...
telnet: Unable to connect to remote host: Connection timed out
