# Telnet SMTP Testing: How to Test SMTP with Telnet and OpenSSL

Use telnet SMTP checks and OpenSSL STARTTLS tests to validate SMTP connectivity, response codes, and TLS posture before inbox-delivery tests.

When your app can't reach its SMTP server, a short Telnet session can show whether the connection opens and the server responds. Work through the checks in this order:

1. verify basic SMTP connectivity
2. verify TLS with OpenSSL
3. validate auth and envelope commands
4. run inbox and deliverability checks

## Quick answer: should you still use Telnet for SMTP?

Yes for first-pass diagnostics. Telnet is useful for plain connectivity and protocol responses, but it is not encrypted. For secure checks, use OpenSSL with STARTTLS.

## Basic SMTP connectivity test with Telnet

```bash
telnet smtp.example.com 25
```

If the connection works, you should see an SMTP greeting such as:

```text
220 smtp.example.com ESMTP ready
```

Then test command flow:

```text
EHLO test.local
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
QUIT
```

Useful response patterns:

- `220`: service ready
- `250`: accepted
- `4xx`: temporary issue
- `5xx`: permanent failure (auth/policy/config)

## TLS check with OpenSSL (recommended)

For authenticated submission flows, test STARTTLS on port 587:

```bash
openssl s_client -starttls smtp -connect smtp.example.com:587
```

After TLS negotiation, run:

```text
EHLO test.local
```

Confirm advertised capabilities such as `STARTTLS` and `AUTH`.

Related references:

- [SMTP authentication](/blog/smtp-authentication/)
- [STARTTLS vs SSL/TLS](/blog/starttls-ssl-tls/)
- [SMTP ports guide](/blog/which-smtp-port-should-i-use/)

## Common SMTP troubleshooting patterns

### Cannot connect to SMTP host

Likely causes:

- wrong hostname or port
- blocked outbound firewall or VPC egress
- provider network restrictions

### STARTTLS fails

Likely causes:

- TLS mismatch for selected port
- certificate chain or trust issues
- middlebox/network interference

### `535` auth failure or `550` relay rejection

Likely causes:

- incorrect credentials
- sender identity policy mismatch
- relay restrictions for account/domain

## Use Telnet/OpenSSL as step one, not final validation

Protocol checks do not confirm inbox placement or template correctness.

Follow with:

- [Email Sandbox](/product/email-sandbox/)
- [Email integration testing](/product/email-integration-testing/)
- [Email webhooks](/guides/email-webhooks/)
- [Email deliverability test](/testing/email-deliverability-test/)



### Take your Telnet check all the way to delivery

The server responds. Now try the send from your app to a MailSlurp inbox. Check that the message arrives with the right content, and save that test for future changes.

[Test SMTP email delivery](/product/email-integration-testing/)



## Release checklist after SMTP connectivity tests

1. Verify SMTP connectivity and capability responses.
2. Verify TLS and auth posture with OpenSSL.
3. Validate end-to-end delivery and content in real inbox tests.
4. Add webhook-based observability for bounce and failure events.
5. Re-run checks after DNS or provider config changes.

## FAQ

### Is Telnet secure for SMTP testing?

No. Telnet is plaintext and best used only for low-risk connectivity checks. Use OpenSSL for TLS validation.

### Should I test SMTP on port 25 or 587?

Port 587 is usually preferred for authenticated client submission. Port 25 is commonly restricted in cloud environments.

### Why does SMTP test pass but users still do not receive email?

Connectivity success does not guarantee inbox placement. Run deliverability and inbox-based integration tests.

## Next steps

- [What is an SMTP server?](/guides/what-is-an-smtp-server/)
- [SMTP and IMAP guide](/guides/smtp-imap/)
- [Email deliverability test](/testing/email-deliverability-test/)
