Servers : How to manually test a SMTP connection using Telnet

By | December 17, 2013

Here is the steps required to test and send an e-mail using the command prompt and Telnet. See the commands required below :

Here is an overview of what you’ll get with the commands in bold :

# telnet smtp.domain.tld 25
Trying 0.0.0.0…
Connected to smtp.domain.tld (0.0.0.0).
Escape character is ‘^]’.
220 smtp.domain.tld ESMTP
EHLO
250-smtp.domain.tld
250-STARTTLS
250-PIPELINING
250-8BITMIME
250-SIZE 20971520
250 AUTH LOGIN PLAIN CRAM-MD5
MAIL from:Your_Address@domain.tld
250 ok
RCPT to:recipient@domain.tld
250 ok
DATA
354 go ahead
From:Your_Address@domain.tld
To:recipient@domain.tld
Subject:Test SMTP
Write some content here!
.
250 ok 1386818150 qp 7837
QUIT
221 smtp.domain.tld
Connection closed by foreign host.
#