メール送信確認

コマンドでメール送信を確認。DATAの最後は、"."のみの行であること。以下も参照のこと。

http://www.puni.net/~mimori/smtp/ref.html

$ telnet smtp.example.jp 25
Trying 192.168.1.1...
Connected to smtp.example.jp.
Escape character is '^]'.
220 smtp.example.jp ESMTP Sendmail 8.13.1/8.13.1; Wed, 22 Apr 2009 10:54:19 +0900
HELO mysmtp.example.com
250 smtp.example.jp Hello mysmtp.example.com [192.168.1.2], pleased to meet you
MAIL FROM: foo@example.com
250 2.1.0 foo@example.com... Sender ok
RCPT TO: bar@example.jp
250 2.1.5 bar@example.jp... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
From: foo@example.com
To: bar@example.jp
Subject: test

This is test.
.

QUIT
Connection closed by foreign host.
$