-4

I have web application which I am setting up on a new vps. It is supposed to send email to the business owner whenever clients leave messages via the web-application.

Apparently, the VPS can not send emails for some reason (I tested it with a python script which working on anther VPS). I am looking for a way to confirm whether a network policy is stopping my vps to connect to smtp.gmail.com:587. Sth like nmap to make sure whether I am allowed to connect to smpt of gmail.

Please let me know your comments.

1
  • 2
    Well, can you connect to that port? If so, it's not blocked.
    – EEAA
    Nov 25, 2016 at 1:23

1 Answer 1

2

You can use telnet to test port connectivity. Example:

[ttucker@localhost ~]$ telnet smtp.gmail.com 587
Trying 2607:f8b0:400e:c02::6c...
Connected to smtp.gmail.com.
Escape character is '^]'.
220 smtp.gmail.com ESMTP x123sm45810007pgb.3 - gsmtp

If you see the 220 smtp.gmail.com ESMTP banner line then you can connect.

Not the answer you're looking for? Browse other questions tagged .