Mail (e-mail)

Mail (e-mail)

SMTP (Simple Mail Trans Protocol) メールプロトコル

詳細はRFC821を参考して下さい。

サンプル:
入力

telnet intsmtp.bar.com 25
HELO intsmtp.bar.com
MAIL FROM:<foo@po.bar.com>
RCPT TO:<foo@po.bar.com>
DATA
hello!
.
QUIT

入力と応答
$ telnet intsmtp.bar.com 25
Trying 172.16.250.17...
Connected to intsmtp.bar.com (172.16.250.17).
Escape character is '^]'.
220 EX-RT02.bar.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at  Wed, 5 Mar 2008 18:08:03 +0900
HELO intsmtp.bar.com
250 EX-RT02.bar.com Hello [192.168.111.151]
MAIL FROM:<foo@po.bar.com>
250 2.1.0 foo@po.bar.com....Sender OK
RCPT TO:<foo@po.bar.com>
250 2.1.5 foo@po.bar.com
RCPT TO:<foo2@po.bar.com>
250 2.1.5 foo2@po.bar.com
DATA
354 Start mail input; end with <CRLF>.<CRLF>
hello!
.
250 2.6.0 <EX-RT02gAusVxONvzyJ00007a48@EX-RT02.bar.com> Queued mail for delivery
QUIT
221 2.0.0 EX-RT02.bar.com Service closing transmission channel
Connection closed by foreign host.

IMAP