I want to send an email via telnet. When I typed to the command prompt

telnet 'smtp_servername' 25 the following message appears
Could not open connection to the host, on port 25: Connect failed

Server name and listening port are correct. I have configured an account with these credentials with Mozilla Thunderbird (Secure Authentication: yes and Connection Security: None) and is working fine.

If I do the same test with the pop server is working fine.

telnet 'pop_servername' 110
+OK The Microsoft Exchange POP3 service is ready.

Any ideas why the smtp server is not answering my telnet connection?

Thanks in advance,


  • You should mark the answer that solved your issue as the correct answer by check-marking it. This will help future visitors of stackoverflow in faster finding the relevant piece of advice to their problem.
    – Oliver
    May 7, 2013 at 10:43

2 Answers 2


Do you have a firewall that may block telnet.exe ? When using security, the tcp port often change from 25 to something else. Can you check that thunderbird didn't automatically changed the port number ?

When you do a telnet on a port, the other can't know it's telnet, until you type something at least (or timeout if you don't type fast enough)

  • 2
    If you know for a fact that the remote machine is running a SMTP server you probably have a firewall issue. Note that many ISPs now block port 25 to the outside world unless you're a "business customer", so the block may be outside your control.
    – voretaq7
    Feb 8, 2010 at 16:53
  • At the end was the firewall blocking. Thanks for the answers, the issue is finished, unfortunately due to the slow process of communication with the system IT department, I was unable to know the answer earlier.
    – Albert
    Feb 23, 2010 at 8:45
  • Please mark this one as the answer then.
    – mlhDev
    Jan 25, 2017 at 20:23

You sure you did not set up the SMTP server to answer only to 'secure smtp' (port 465, IIRC)? This would explain the closed port 25.

Another hint: perhaps you need to authenticate first (via POP3) in order to have port 25 unblocked for your IP. Can you try telnetting after you successfully checked mail?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.