Email testing with telnet

From thelinuxwiki
Jump to: navigation, search

example:

$ telnet yourmailserver.com 25
Trying 21.40.23.46...
Connected to yourmailserver.com.
Escape character is '^]'.
220 mx.yourmailserver.com ESMTP Sendmail 8.12.9/8.12.9; Thu, 12 Jun 2003 10:06:19 -0700
helo frommail.com
250 main.signalq.com Hello [12.24.14.32], pleased to meet you
mail from: butter22333@frommail.com
250 2.1.0 butter22333@frommail.com... Sender ok
rcpt to: webmaster@yourmailserver.com
250 2.1.5 webmaster@yourmailserver.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
Subject: test message
this is a test
.
250 2.0.0 h5CH6GVI015806 Message accepted for delivery
quit
221 2.0.0 mx.yourmailserver.com closing connection
Connection closed by foreign host.