SMTP を使用してメッセージを送信する
□ SMTP を使用してメッセージを送信する
ここでは telnet を使用して SMTPコマンドでメールサーバーにメッセージを送信する方法を紹介します。
#
telnet test 25
Trying 192.168.206.201...
Connected to test.hogehoge.com.
Escape character is '^]'.
220 test.hogehoge.com -- Server ESMTP (iPlanet Messaging Server 5.1
(built May 7 2001))
helo test
250 test.hogehoge.com OK, test11.hogehoge.com [192.168.206.11].
mail from:
root@hogehoge.com
250 2.5.0 Address Ok.
rcpt to: test3@hogehoge.com
250 2.1.5 test3@hogehoge.com OK.
data
354 Enter mail, end with a single ".".
Did you get this?
.
250 2.5.0 Ok.
quit
221 2.3.0 Bye received. Goodbye.
Connection closed by foreign host.
#
□ ヘッダ情報を入力して送信する
#
telnet test 25
Trying 192.168.206.201...
Connected to test.hogehoge.com.
Escape character is '^]'.
220 test.hogehoge.com -- Server ESMTP (iPlanet Messaging Server 5.1
(built May 7 2001))
helo test
251 test.hogehoge.com system name not given in HELO command,
test11.hogehoge.com [192.168.206.11].
mail from: root@hogehoge.com
250 2.5.0 Address Ok.
rcpt to: test3@hogehoge.com
250 2.1.5 test3@hogehoge.com OK.
data
354 Enter mail, end with a single ".".
To: test3
From: root@hogehoge.com
Subject: test message
<--- ここの空白行がポイント--->
Did you get this?
.
250 2.5.0 Ok.
quit
221 2.3.0 Bye received. Goodbye.
Connection closed by foreign host.
#
Solaris系技術トレーニング一覧