good troubleshooting
check the smtp is up
telnet smtp.gmail.com 587 # (or 25 or 465)
check the smtp works on STARTTLS
openssl s_client -starttls smtp -connect mail.example.com:587 # (or 25 or 465)
telnet smtp.gmail.com 587 # (or 25 or 465)
openssl s_client -starttls smtp -connect mail.example.com:587 # (or 25 or 465)