📜  SMTP回应

📅  最后修改于: 2021-08-24 08:20:04             🧑  作者: Mango

简单邮件传输协议(SMTP)响应从服务器发送到客户端。 SMTP中的每个响应均以三位数代码开头,并且其后可能还有其他文本信息。响应中的前两位数字表示响应的类别。以下是响应的不同类别:

1. Positive completion reply
2. Positive Intermediate reply
3. Transient Negative Completion reply 
4. Permanent Negative Completion reply 

这些解释如下:

  1. 积极完成答复–
    此答复是指成功完成操作。之后,可以发起新请求。
  2. 积极的中级答复–
    此答复指的是接受我们的命令,但请求的操作处于暂停状态,并且有待进一步接收信息。
  3. 瞬态负完成答复–
    此答复表示该命令未被接受,并且未发生请求的操作。在这种情况下,错误状态是暂时的,可能还会再次请求采取措施。
  4. 永久否定完成回复–
    此答复表示该命令未被接受,并且未发生请求的操作。

下表列出了各种SMTP响应:

Category Code Description
Positive
Completion
Reply
211 System status and system help reply.
214 Help message.
220 service ready.
221 service closing transmission channel.
250 Requested mail action okay, completed.
251 User not local; the message will be forwarded to .
Positive
Intermediate
Reply
354 Start mail input; end with .

Transient

Negative

Completion

Reply

421 service not available, losing transmission channel.
450 Requested mail action not taken, mailbox not available ( e.g. Mailbox busy ).
451 Requested action aborted; local error in processing.
452 Requested action not taken; insufficient system storage system.
Permanent
Negative
Completion
Reply
500 Syntax error, command unrecognized.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command parameter not implemented.
550 The requested action is not taken due to the unavailability of mailbox ( e.g. Mailbox not found, no access ).
551 User not local; please try .
552 Requested mail action aborted; exceeded storage allocation.
553 The requested action is not taken because the mailbox name does not allowed it (e.g., Mailbox syntax incorrect.).
554 Transaction failed.