You can use the telnet command line utility to test connections to SMTP servers on ports 25 and 587. This helps identify issues.