
Testing SMTP via Telnet
Test the SMTP email protocol over a simple Telnet connection.
1 min read
The availability and basic function of an email server can be tested quite simply via Telnet.
telnet mail.server.com 25
220 mail.server.com
helo client.pc.com # Name of the sending server
250 OK
mail from:thomas@pc.com # Email sender
250 OK
rcpt to:someone@server.com # Email recipient
250 OK
data # Starts entering the actual email
354 Start mail input; end with <CRLF>.<CRLF>
Subject:Testmail
# an empty line ends the mail header
Testmail text
.
250 OK
quit # End the SMTP session
221 Service closing transmission channel
Note: There is a high chance that test emails sent via Telnet end up in the spam filter.