[基本资料]
* 4.1 SMTP Commands 4.1.1.1 Extended HELLO (EHLO) or HELLO (HELO)
4.1.1.2 MAIL (MAIL)
4.1.1.3 RECIPIENT (RCPT)
4.1.1.4 DATA (DATA)
4.1.1.5 RESET (RSET)
4.1.1.6 VERIFY (VRFY)
4.1.1.7 EXPAND (EXPN)
4.1.1.8 HELP (HELP)
4.1.1.9 NOOP (NOOP)
4.1.1.10 QUIT (QUIT)
4.2.1 Reply Code Severities and Theory1yz Positive Preliminary reply
2yz Positive Completion reply
3yz Positive Intermediate reply
4yz Transient Negative Completion reply
5yz Permanent Negative Completion reply
x0z Syntax
x1z Information
x2z Connections
x3z Unspecified
x4z Unspecified
x5z Mail system
4.2.2 Reply Codes by Function Groups
500 Syntax error, command unrecognized
(This may include errors such as command line too long)
501 Syntax error in parameters or arguments
502 Command not implemented (see section 4.2.4)
503 Bad sequence of commands
504 Command parameter not implemented
211 System status, or system help reply
214 Help message
(Information on how to use the receiver or the meaning of a
particular non-standard command; this reply is useful only
to the human user)
220
Service ready
221 Service closing transmission channel
421 Service not available, closing transmission channel
(This may be a reply to any command if the service knows it
must shut down)
250 Requested mail action okay, completed
251 User not local; will forward to
(See section 3.4)
252 Cannot VRFY user, but will accept message and attempt
delivery
(See section 3.5.3)
450 Requested mail action not taken: mailbox unavailable
(e.g., mailbox busy)
550 Requested action not taken: mailbox unavailable
(e.g., mailbox not found, no access, or command rejected
for policy reasons)
451 Requested action aborted: error in processing
551 User not local; please try
(See section 3.4)
452 Requested action not taken: insufficient system storage
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
(e.g., mailbox syntax incorrect)
354 Start mail input; end with .
554 Transaction failed (Or, in the case of a connection-opening
response, "No SMTP service here")
4.2.3 Reply Codes in Numeric Order
211 System status, or system help reply
214 Help message
(Information on how to use the receiver or the meaning of a
particular non-standard command; this reply is useful only
to the human user)
220 Service ready
221 Service closing transmission channel
250 Requested mail action okay, completed
251 User not local; will forward to
(See section 3.4)
252 Cannot VRFY user, but will accept message and attempt
delivery
(See section 3.5.3)
354 Start mail input; end with .
421 Service not available, closing transmission channel
(This may be a reply to any command if the service knows it
must shut down)
450 Requested mail action not taken: mailbox unavailable
(e.g., mailbox busy)
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognized
(This may include errors such as command line too long)
501 Syntax error in parameters or arguments
502 Command not implemented (see section 4.2.4)
503 Bad sequence of commands
504 Command parameter not implemented
550 Requested action not taken: mailbox unavailable
(e.g., mailbox not found, no access, or command rejected
for policy reasons)
551 User not local; please try
(See section 3.4)
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
(e.g., mailbox syntax incorrect)
554 Transaction failed (Or, in the case of a connection-opening
response, "No SMTP service here")
* /
*
[扩展资料]
* 使用telnet发送简单“英文”email
* $ telnet smtp.qq.com 25
ehlo test // 报名字(随便写)
auth login
ZXhhbXBsZQ== // example(邮箱用户名)的base64编码
cGFzc3dvcmQ= // password(邮箱密码)的base64编码
mail from: <example@qq.com>
rcpt to: <example@163.com>
data // 以下输入邮件内容,要符合MIME规范
from: example@qq.com
to: example@163.com
subject: mailtest
mime-version: 1.0
content-type: text/plain
// 这里要空一行再写邮件正文
this is a test mail!
. // 结束符
quit // 断开连接
[关于MIME]
* /
* RFC
Security Multiparts for MIME: Multipart/Signed and Multipart/Encrypted
MIME Part One: Format of Internet Message Bodies.
MIME Part Two: Media Types. N. Freed, Nathaniel Borenstein。November 1996.
MIME Part Three: Message Header Extensions for Non-ASCII Text. Keith Moore。November 1996.
MIME Part Four: Media Type Specifications and Registration Procedures.
MIME Part Four: Registration Procedures. N. Freed, J. Klensin. December 2005.
MIME Part Five: Conformance Criteria and Examples. N. Freed, N. Borenstein. November 1996.
MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations. N. Freed, K. Moore. November 1997.
The MIME Multipart/Related Content-type
* /
*
*
* CSDN技术中心 MIME邮件面面观
* 邮件编码专题
阅读(720) | 评论(0) | 转发(0) |