I know two reasons for receiving this:
The domain name you've written doesn't exist You are not connected the InternetYou can connect to your mail server using an IP address, rather than a domain name. You can write for example:
nc -v 192.168.1.107 25