search
HomeBackend DevelopmentPHP TutorialRFC821-Simple Mail Transfer Protocol SMTP Chinese version-1_PHP tutorial
RFC821-Simple Mail Transfer Protocol SMTP Chinese version-1_PHP tutorialJul 13, 2016 pm 05:27 PM
internetsmtpChinese VersiontransmissionprotocolareaintroduceyesSimplemail

3.7. Domains Domains were recently introduced into the ARPA Internet mail system. Using domains changes the address space from a flat plain string hostname to a hierarchy of global addresses. The host is replaced by a domain name, and the starting host is a sequence of tuples, ordered by commas from most specific to most general. For example, "USC-ISIF.ARPA", "Fred.Cambridge.UK" and "PC7.LCS.MIT.ARPA" might be host-domain identifiers. Regardless of how the domain name is used in SMTP, only the official name can be used, not pseudonyms or nicknames. 3.8. Changing Roles The TURN command can be used to change the role of a program communicating on a transport channel. If program A is currently sending SMTP, after it sends the TURN command and receives the OK response (250), it changes to receiving SMTP. In the same way, Program B can also change from receiving SMTP to sending SMTP. To refuse the role change, the recipient can send a 502 as a response. Note: This command is optional. This command is generally not used when using the TCP transport channel. However, this command is useful when establishing a transmission channel is expensive. For example, this command can support the general public switched telephone system as the transmission channel. 4. SMTP description 4.1. SMTP commands 4.1.1. Command syntax SMTP commands define mail transmission or system functions defined by users. Its command is a string terminated by . In the case of parameters, the command itself is separated by and parameters. If there are no parameters, it can be directly connected to . The syntax format of the email must be consistent with the format of the receiving site. SMTP commands and responses are discussed below. The sending email operation involves different data objects, which are connected to each other by different parameters. The reply path is the parameter of the MAIL command, the forwarding path is the parameter of the RCPT command, and the email date is the parameter of the DATA command. These parameters or data objects must follow the command. This mode also requires different buffers to store these objects, that is, a reply path buffer, a forward path buffer, and a message content buffer. Certain commands create their own buffers, or cause the contents of one or more buffers to be cleared. HELLO (HELO) This command is used to send SMTP confirmation to receive SMTP. The parameter field includes the hostname from which SMTP is sent. Receive SMTP confirms receiving SMTP to Send SMTP via the connection confirmation command. The boot command and OK response confirm that sending and receiving SMTP has entered the initial state, that is, no operations are being performed and all status tables and buffers have been cleared. MAIL (MAIL) This command is used to start sending mail to multiple mailboxes. The parameter field includes the reply path. The return path includes an optional list of hosts and sender mailboxes. When there is a host list, it is a reply path source, which indicates that this mailbox is sent by the hosts in the list one by one (the first host is the last host to receive the email). This table also has source paths for returning non-delivery signals to the sender. Because each passing host address is added at the beginning of this table, it must use a name that is clear to the sending IPCE rather than the receiving IPCE (if they are not an IPCE). The reply path for some error messages may be empty. This command clears the reply path buffer, forwarding path buffer, and message content buffer, and inserts the reply path information for this command into the reply path buffer. RECIPIENT (RCPT) This command is used to determine the only recipient of the message content; multiple recipients will be specified by multiple this command. The forwarding path includes an optional host and a required destination mailbox. When a host list appears, this is a source path that indicates that mail must be sent to the previous host in the list. If receiving SMTP does not implement mail delivery and sending, information such as unknown local user (550) will be returned to the user. When a message is delivered, the delivery host must move its name from the beginning of the forwarding path to the end of the reply path. When the email finally reaches its destination, the receiving SMTP will insert its own name in its host email format into the destination email. For example, when an email with the following parameters is received by delivery host A, FROM: TO: will become the following form: FROM: TO:. This command causes it to be forwarded The path parameters are added to the forwarding path buffer. DATA (DATA) The recipient will use the line following the command as the email content. This command causes the message content following this command to be added to the message content buffer. Email content can include all 128 ASCII characters. The email content is terminated by a line containing only a period, which is the following character sequence: ".", which indicates the end of the email. The end of message content indicates that the recipient should now process the saved message content. This process will clear the contents of the reply path buffer, forwarding path buffer and message content buffer. If the operation is successful, the receiver must return an OK response; if it fails, it must also return a failure response.When the receiving SMTP receives a message, whether it is used for forwarding or the message has arrived at the destination, it must add a timestamp line at the beginning of the message content. This line indicates the receiving host and the sending host of the message. The identification of the host, and the time and date the message content was received. Forwarded letters will have multiple lines with such timestamps. When receiving SMTP for last-stop delivery, it will return the path information line inserted into the message. This line includes the information in the sent command. Here, last-stop delivery means that the mail will be delivered to the intended user, but in some cases, the mail may need further processing and be delivered by another mail system. It is possible that the mailbox in the return path is inconsistent with the actual mail sent. This may occur when a specific error handling mailbox needs to be sent instead of the sender of the mail. The above description shows that the final email content consists of a return path line, followed by one or more timestamp lines. Following these lines are the header and body information of the email content. Specific instructions are required when processing subsequent email data indicates partial success. This may occur when sending SMTP finds that when mail needs to be delivered to multiple users, it can only successfully send the information to some of them. In this case, an OK response must be sent to the DATA command, while the SMTP organization is receiving and sending a "Undeliverable Mail" message to the sender of the message. In this message, either a list of unsuccessful recipients is sent, or multiple unsuccessful recipients are sent, one at a time. All undeliverable mail messages are sent by the MAIL command. Return-Path: Received: from GHI.ARPA by JKL.ARPA; 27 Oct 81 15:27:39 PST Received: from DEF.ARPA by GHI.ARPA; 27 Oct 81 15: 15:13 PST  Received: from ABC.ARPA by DEF.ARPA ; 27 Oct 81 15:01:59 PST  Date: 27 Oct 81 15:01:01 PST  From: JOE@ABC.ARPA   Subject: Improved Mailing System Installed  To: SAM@JKL.ARPA This is to inform you that... SEND (SEND) This command is used to start a send command to send mail to one or more terminals. The Parameters field contains a reply path that, if successful, will send the email to the terminal. The reply path includes an optional list of hosts and the sender's email address. When a host list appears, it means that this is a transmission path, and the mail is sent here through each host on this path (the first host on the list is the last host). This table is used to return non-delivery signals to the sender. Because each pass-through host address is added at the beginning of this table, it must use a name that is clear to the sending IPCE rather than the receiving IPCE (if they are not an IPCE). The reply path for some error messages may be empty. This command clears the reply path buffer, forwarding path buffer, and message content buffer, and inserts the reply path information for this command into the reply path buffer. SEND OR MAIL (SOML) This command is used to start a mail operation to transfer the mail content to one or more terminals, or to a mailbox. For each recipient, if the recipient's terminal is open, the email content will be delivered to the recipient's terminal, otherwise it will be delivered to the recipient's mailbox. The parameter field contains the reply path if the command was successful in sending the message to the terminal or mailbox. The reply path includes an optional list of hosts and the sender's email address. When the host list appears, it means that this is a transmission path, and the mail is sent here through each host on this path (the first host on the list is the last host). This table is used to return non-delivery signals to the sender. Because each pass-through host address is added at the beginning of this table, it must use a name that is clear to the sending IPCE rather than the receiving IPCE (if they are not an IPCE). The reply path for some error messages may be empty. This command clears the reply path buffer, forwarding path buffer, and message content buffer, and inserts the reply path information for this command into the reply path buffer. SEND AND MAIL (SAML) This command is used to start a mail operation to transfer the mail content to one or more terminals and to the mailbox. If the recipient's terminal is open, the email content will be delivered to the recipient's terminal and to the recipient's mailbox. The parameter field contains the reply path if the command succeeds if the message is successfully sent to the mailbox. The reply path includes an optional list of hosts and the sender's email address. When the host list appears, it means that this is a transmission path, and the mail is sent here through each host on this path (the first host on the list is the last host processed). This table is used to return non-delivery signals to the sender. Because each pass-through host address is added at the beginning of this table, it must use a name that is clear to the sending IPCE rather than the receiving IPCE (if they are not an IPCE). The reply path for some error messages may be empty.This command clears the reply path buffer, forwarding path buffer, and message content buffer, and inserts the reply path information for this command into the reply path buffer. RESET (RSET) This command indicates that the sending operation will be aborted. Any saved senders, recipients, and message contents SHOULD be discarded, all buffers and status tables SHOULD be cleared, and the receiver MUST return an OK response. VERIFY (VRFY) This command requires the recipient to confirm that the parameter is a user. If this is a username (already known), returns the user's full name and the specified email address. This command has no effect on the reply path buffer, forward path buffer, and message content buffer. EXPAND (EXPN) This command asks the recipient to confirm that the parameter specifies a mailing list, and if it is a mailing list, returns the members of the list. If this is a username (already known), returns the user's full name and the specified email address. This command has no effect on the reply path buffer, forward path buffer, and message content buffer. HELP (HELP) This command causes the recipient to send a help message to the sender of the HELP command. This command can take parameters and returns specific information as a response. This command has no effect on the reply path buffer, forward path buffer, and message content buffer. NOOP (NOOP) This command does not affect any parameters and commands that have been issued. It simply means that no action was taken and does not mean that the recipient sent an OK response. This command works on reply path buffer, forward path buffer and mail

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531889.htmlTechArticle3.7. Domain domains were recently introduced into the ARPA Internet mail system. Using domains changes the address space from a flat plain string hostname to a hierarchy of global addresses. Host...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
最简便的硬盘序列号查询方式最简便的硬盘序列号查询方式Feb 26, 2024 pm 02:24 PM

硬盘序列号是硬盘的一个重要标识,通常用于唯一标识硬盘以及进行硬件识别。在某些情况下,我们可能需要查询硬盘序列号,比如在安装操作系统、查找正确设备驱动程序或进行硬盘维修等情况下。本文将介绍一些简单的方法,帮助大家查询硬盘序列号。方法一:使用Windows命令提示符打开命令提示符。在Windows系统中,按下Win+R键,输入"cmd"并按下回车键即可打开命

如何通过PHP编写一个简单的在线预约系统如何通过PHP编写一个简单的在线预约系统Sep 26, 2023 pm 09:55 PM

如何通过PHP编写一个简单的在线预约系统随着互联网的普及和用户对便利性的追求,在线预约系统越来越受到欢迎。无论是餐厅、医院、美容院还是其他服务行业,都可以通过一个简单的在线预约系统来提高效率并为用户提供更好的服务体验。本文将介绍如何使用PHP编写一个简单的在线预约系统,并提供具体的代码示例。创建数据库和表格首先,我们需要创建一个数据库来存储预约信息。在MyS

如何使用Java编写一个简单的学生成绩报表生成器?如何使用Java编写一个简单的学生成绩报表生成器?Nov 03, 2023 pm 02:57 PM

如何使用Java编写一个简单的学生成绩报表生成器?学生成绩报表生成器是一个可以帮助老师或教育者快速生成学生成绩报告的工具。本文将介绍如何使用Java编写一个简单的学生成绩报表生成器。首先,我们需要定义学生对象和学生成绩对象。学生对象包含学生的姓名、学号等基本信息,而学生成绩对象则包含学生的科目成绩和平均成绩等信息。以下是一个简单的学生对象的定义:public

快速入门:使用Go语言函数实现简单的图书管理系统快速入门:使用Go语言函数实现简单的图书管理系统Jul 30, 2023 am 09:18 AM

快速入门:使用Go语言函数实现简单的图书管理系统引言:随着计算机科学领域的不断发展,软件应用的需求也越来越多样化。图书管理系统作为一种常见的管理工具,也成为很多图书馆、学校和企业必备的系统之一。在本文中,我们将使用Go语言函数来实现一个简单的图书管理系统。通过这个例子,读者可以学习到Go语言中函数的基本用法以及如何构建一个实用的程序。一、设计思路:我们首先来

修复:Windows 11、10 中邮件和日历应用程序的错误代码 0x80070490修复:Windows 11、10 中邮件和日历应用程序的错误代码 0x80070490Apr 13, 2023 pm 09:13 PM

一些 Windows 用户在尝试将 Gmail 或任何其他电子邮件帐户添加到 Windows PC 上的邮件应用程序时报告了错误消息“出现问题,我们很抱歉,但我们无法做到这一点”以及错误代码0x80070490 在屏幕上。即使经过多次尝试,客户也无法将任何电子邮件帐户添加到他们的邮件应用程序中。用户非常不满意,并且不确定如何从这里转移。在邮件应用程序中添加电子邮件帐户时出现此错误的可能原因可能是系统数据文件损坏、邮件应用程序的一些内部问题、过时的邮件应用程序等。在分析了上述可能导致此错误的原因后

如何通过C++编写一个简单的音乐推荐系统?如何通过C++编写一个简单的音乐推荐系统?Nov 03, 2023 pm 06:45 PM

如何通过C++编写一个简单的音乐推荐系统?引言:音乐推荐系统是现代信息技术的一个研究热点,它可以根据用户的音乐偏好和行为习惯,向用户推荐符合其口味的歌曲。本文将介绍如何使用C++编写一个简单的音乐推荐系统。一、收集用户数据首先,我们需要收集用户的音乐偏好数据。可以通过在线调查、问卷调查等方式来获得用户对不同类型音乐的喜好程度。将数据保存在一个文本文件或数据库

如何在 iPhone 和 iPad 上的邮件应用中将 Gmail 设置为删除而不是存档如何在 iPhone 和 iPad 上的邮件应用中将 Gmail 设置为删除而不是存档Apr 13, 2023 pm 02:34 PM

您是否注意到,当您尝试在 iOS 上删除 Gmail 中的邮件时,您只会看到存档选项?继续阅读以了解如何在 iPhone 上删除 Gmail,而不是在邮件应用中存档。更改使用iPhone 和 iPad上的邮件应用程序归档 Gmail 电子邮件的默认选项的设置完全隐藏在设置中,但一旦你知道去哪里,它就可以快速更改。请记住,本教程适用于通过 iPhone 和 iPad 上的 Apple 邮件应用程序使用 Gmail 的用户。另一种选择是在 iPhone/iPad 上使用 Gmail 应用程序。您甚至

如何使用PHP开发简单的文件管理功能如何使用PHP开发简单的文件管理功能Sep 20, 2023 pm 01:09 PM

如何使用PHP开发简单的文件管理功能简介:文件管理功能在很多Web应用中都是必不可少的一部分。它允许用户上传、下载、删除和展示文件,为用户提供了便捷的文件管理方式。本文将介绍如何使用PHP开发一个简单的文件管理功能,并提供具体的代码示例。一、创建项目首先,我们需要创建一个基本的PHP项目。在项目目录下创建以下文件:index.php:主页面,用于显示上传表

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft