Email Organization Structure

Source: Internet
Author: User

The header field of the mime message.
Content-Type
The content in the Content-Type field is in the form of "main type/subtype". The main types include text, image, audio, video, application, multipart, and message, it represents text, images, audio, video, applications, composite structures, messages, and so on. The main text type includes plain, HTML, XML, CSS, and other subtypes. The multipart primary type is used to represent mime composite messages. It is the most important type in the mime protocol.
MIME messages can have three composite relationships: mixing, association, and selection. Their corresponding MIME types are as follows:
Multipart/mixed
Indicates that the content in the message body is a hybrid combination, and the content can be a mixture of texts, sounds, attachments, and other different mail content,
Multipart/related
Indicates that the content in the message body is an association (dependency) combination type, indicating that some resources (HTL code) need to reference (depend on) Other resources (image data ), the referenced resource and the referenced resource must be combined into a multipart/related mime combination message.
Multipart/alternative
Indicates that the content in the message body is of the combination type. For example, when the body of an email is expressed in both HTML and plain text formats, they can be nested in a multipart/alternative mime combination message. The advantage of this approach is that if the email reader does not support HTML format, it can be replaced by text format.

In the Content-Type header field, apart from defining the MIME type of the message body, and containing the corresponding attributes after the MIME type, the attributes appear in the form of "property name = property value, the properties and MIME types are separated by semicolons.

Common attributes

Primary Type

Attribute name

Description

Text

Charset

Character Set encoding used to describe text content

Image

Name

Specifies the file name of an image file.

Application

Name

Specifies the application file name.

Multipart

Boundary

Used to define the delimiter between MIME messages

Other header fields
Content-transfer-Encoding
The mail encoding method used to specify the content in the mime message body.
Content-dispotition
There are two standard ways to process data using the specified email reader: inline and attachment. inline indicates direct processing, while attachment indicates processing as an attachment. If you set content-disposition to attachment, you can also specify the filename attribute, as shown below: Content-dispotition: attachment; the MIME header field above filename = "1.bmp" indicates that the content of the mime message body is an email attachment, and the attachment name is "1.bmp ".
Content-ID
It is used to specify a unique identifier number for the embedded resource in the multipart/related combination message. This unique identifier number can be used in the HTML format to reference the embedded resource. For example, set the content-ID header field of a mime message that represents an embedded image to the following format:
Content-ID: it315logo_gif
In this case, you must use the following HTML statement to reference the image resource:

Note: When referencing the embedded resource identified by the content-ID header field, add "CID:" Before the unique ID of the resource :", it indicates that the resource must be referenced with a unique ID number.
Content-location
It is used to set a URI address for Embedded resources. The URI address can be absolute or relative. When the content-Location header field is used to specify a URI address for an embedded resource, the URI can also be used to reference the embedded resource in the HTML format. For example, set the content-Location header field of a mime message that represents an embedded image to the following format:
Content-location: http://www.it315.org/images/it315logo.gif
The following HTML statement can be used to reference the image resource in the hmlt body:

Content-Base
This parameter is used to set a reference path for Embedded resources. Only in this way can the URI set in the Content-Location header use a relative address .. For example, if you set the content-base and content-Location header fields of a mime message that represents an embedded image to the following format:
Content-base: http://www.it315.org/images/
Content-location: it315logo.gif
Then, the complete path of the embedded resource is added to the reference path set by the content-base header field and the relative path set by the content-Location header field, in the html body, you can use the following HTML and to reference the image resource:

Mime mail encoding method
The message encoding method of the mime message body is specified by the content-transfer-encoding header field in the mime message header. The end of each encoding method is as follows:
7bit
The message body contains all unencoded ASCII characters.
8bit
The value message body contains unencoded raw data that contains non-ASCII characters.
Base64
It is a common encoding method that converts binary data to printable ASCII data. Its basic principle is to group A group of consecutive bytes by 6 bits, each group of data is represented by an ASCII character.
Quoted-printable
It is a type of encoding that converts binary data into printable ASCII characters. It does not convert ASCII data, but only encodes non-ASCII data.

Email Organization Structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.