Wednesday, March 12, 2014

How to test an SMTP server using telnet

$ telnet server_name smtp
Trying server_name...
Connected to server_name.
Escape character is '^]'.

MAIL from: a@b.com
250-HELO/EHLO Command not issued, proceeding anyway
250 a@b.com... Sender OK
RCPT to: a@b.com
250 a@b.com... Recipient OK
DATA
354 Enter message, end with "." on a line by itself
From: a@b.com
TO: a@b.com
Subject: Test message

This is a test message.
.
250 Message accepted for delivery
QUIT
221 smtp.smtp.com SMTP Service closing transmission channel
Connection closed by foreign host.
$

No comments: