Telnet gives terminal access to plaintext network services. You can use it to validate SMTP behavior quickly when debugging routing, connectivity, or command-sequence issues.
Installing telnet
Telnet comes with most Linux and Mac systems. On Windows machines you must enable telnet in the control panel programs and features section.

Connect to an SMTP server
Open a terminal and connect to an SMTP endpoint:
Here we connect to a MailSlurp SMTP endpoint. Replace host and port with your own provider values.
Common ports:
: legacy relay (often blocked on cloud hosts): submission with STARTTLS: implicit TLS (not suitable for plain telnet): alternate SMTP endpoint on some providers
If you are unsure which port to use, see SMTP ports explained.
Send e-mail via telnet: SMTP session example
After connecting, run commands in this order:
Important details:
starts an extended SMTP session and returns server capabilities.andmust use mailbox syntax with angle brackets.starts message content mode; end with a single dot () on its own line.- Include at least
,, andheaders for readability.
Why telnet sometimes fails on production SMTP
Many production SMTP providers require encryption and authentication before mail submission.
If your server requires STARTTLS or AUTH, plain telnet will not complete the full flow. Use:
for encrypted testing- application clients (Nodemailer, JavaMail, SMTP libraries) for auth-enabled send paths
What about receiving email?
SMTP is for sending. To retrieve messages, use POP3 or IMAP (different protocols and commands).
For inbox retrieval and test assertions, use:
BCC and CC
For more options see the BCC and CC SMTP guide.
Production next steps after telnet testing
Telnet is useful for protocol debugging, but production workflows need additional safety checks:
- Validate long-term server setup with SMTP and IMAP settings.
- Confirm encryption choices using STARTTLS vs SSL vs TLS.
- Add a full email deliverability test before scaling traffic.
- Use Email Sandbox for repeatable CI and staging validation.
Wrapping Up
In conclusion, this article has demonstrated how you can use telnet to interact directly with an SMTP server, such as MailSlurp's, enabling you to send emails, specify sender and recipient addresses, and compose messages in real-time.
MailSlurp not only serves as a reliable SMTP server for sending emails using telnet commands, but also offers additional functionalities, such as email tracking, inbox automation, and as an email address API. This comprehensive toolset makes MailSlurp an indispensable resource for developers looking to test and manage email functionality in their applications.


