Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Email
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Message format {{anchor|Internet Message Format}}== The basic Internet message format used for email<ref>The Internet message format is also used for [[usenet|network news]]</ref> is defined by {{IETF RFC|5322}}, with encoding of non-ASCII data and multimedia content attachments defined in RFC 2045 through RFC 2049, collectively called ''[[Multipurpose Internet Mail Extensions]]'' or ''MIME''. The extensions in [[International email]] apply only to email. RFC 5322 replaced RFC 2822 in 2008. Earlier, in 2001, RFC 2822 had in turn replaced RFC 822, which had been the standard for Internet email for decades. Published in 1982, RFC 822 was based on the earlier RFC 733 for the ARPANET.<ref>{{cite web|first=Ken|last=Simpson|title=An update to the email standards|date=October 3, 2008|publisher=MailChannels Blog Entry|url=https://blog.mailchannels.com/2008/10/update-to-email-standards.html|url-status=live|archive-url=https://web.archive.org/web/20081006080735/https://blog.mailchannels.com/2008/10/update-to-email-standards.html|archive-date=October 6, 2008}}</ref> Internet email messages consist of two sections, "header" and "body". These are known as "content".<ref>{{cite ietf | rfc = 5321 | title = Simple Mail Transfer Protocol | date = October 2008 | author = J. Klensin | section = 2.3.1 | sectionname = Mail Objects | quote = SMTP transports a mail object. A mail object contains an envelope and content. ... The SMTP content is sent in the SMTP DATA protocol unit, and has two parts: the header section and the body. | mode = cs2 }}</ref><ref>{{cite ietf | rfc = 5598 | title = Internet Mail Architecture | date = July 2009 | author = D. Crocker | section = 4.1 | sectionname = Message Data | quote = A message comprises a transit-handling envelope and the message content. The envelope contains information used by the MHS. The content is divided into a structured header and the body. | mode = cs2 }}</ref> The header is structured into [[Field (computer science)|fields]] such as From, To, CC, Subject, Date, and other information about the email. In the process of transporting email messages between systems, SMTP communicates delivery parameters and information using message header fields. The body contains the message, as unstructured text, sometimes containing a [[signature block]] at the end. The header is separated from the body by a blank line. ===Message header=== <!-- This section is linked from [[Bracket]] --> RFC 5322 specifies the [[syntax]] of the email header. Each email message has a [[Header (computing)|header]] (the "header section" of the message, according to the specification), comprising a number of [[Field (computer science)|fields]] ("header fields"). Each field has a name ("field name" or "header field name"), followed by the separator character ":", and a value ("field body" or "header field body"). Each field name begins in the first character of a new line in the header section, and begins with a non-[[Whitespace character|whitespace]] [[Printable characters|printable character]]. It ends with the separator character ":". The separator is followed by the field value (the "field body"). The value can continue onto subsequent lines if those lines have space or tab as their first character. Field names and, without [[Simple Mail Transfer Protocol#SMTPUTF8|SMTPUTF8]], field bodies are restricted to 7-bit ASCII characters. Some non-ASCII values may be represented using MIME [[MIME#Encoded-Word|encoded words]]. ====Header fields==== Email header fields can be multi-line, with each line recommended to be no more than 78 characters, although the limit is 998 characters.{{ref RFC|5322}} Header fields defined by RFC 5322 contain only [[US-ASCII]] characters; for encoding characters in other sets, a syntax specified in RFC 2047 may be used.{{ref RFC|2047}} In some examples, the IETF EAI working group defines some standards track extensions,{{ref RFC|6532}}{{ref RFC|6531}} replacing previous experimental extensions so [[UTF-8]] encoded [[Unicode]] characters may be used within the header. In particular, this allows email addresses to use non-ASCII characters. Such addresses are supported by Google and Microsoft products, and promoted by some government agents.<ref>{{Cite news|url=https://economictimes.indiatimes.com/tech/internet/now-get-your-email-address-in-hindi/articleshow/53830034.cms|title=Now, get your email address in Hindi - The Economic Times|newspaper=The Economic Times|access-date=2016-10-17|url-status=live|archive-url=https://web.archive.org/web/20160828044631/https://economictimes.indiatimes.com/tech/internet/now-get-your-email-address-in-hindi/articleshow/53830034.cms|archive-date=2016-08-28}}</ref> The message header must include at least the following fields:<ref>{{cite IETF|rfc=5322|section=3.6 |title=Internet Message Format|sectionname=Field Definitions |date=October 2008 |access-date=2014-01-09 |editor-first1=P |editor-last1=Resnick }}</ref><ref>{{cite IETF|rfc=5322|section=3.6.4 |title=Internet Message Format|sectionname=Identification Fields |date=October 2008 |access-date=2014-01-09 |editor-first1=P |editor-last1=Resnick }}</ref> * ''From'': The email address, and, optionally, the name of the author(s). Some email clients are changeable through account settings. * ''Date'': The local time and date the message was written. Like the ''From:'' field, many email clients fill this in automatically before sending. The recipient's client may display the time in the format and time zone local to them. RFC 3864 describes registration procedures for message header fields at the [[Internet Assigned Numbers Authority|IANA]]; it provides for [https://www.iana.org/assignments/message-headers/perm-headers.html permanent] and [https://www.iana.org/assignments/message-headers/prov-headers.html provisional] field names, including also fields defined for MIME, netnews, and HTTP, and referencing relevant RFCs. Common header fields for email include:{{ref RFC|5064}} * ''To'': The email address(es), and optionally name(s) of the message's recipient(s). Indicates primary recipients (multiple allowed), for secondary recipients see Cc: and Bcc: below. * ''Subject'': A brief summary of the topic of the message. [[E-mail subject abbreviations|Certain abbreviations]] are commonly used in the subject, including [[E-mail subject abbreviations|"RE:" and "FW:"]]. * ''Cc'': [[Carbon copy]]; Many email clients mark email in one's inbox differently depending on whether they are in the To: or Cc: list. * ''Bcc'': [[Blind carbon copy]]; addresses are usually only specified during SMTP delivery, and not usually listed in the message header. * [[Content-Type]]: Information about how the message is to be displayed, usually a [[MIME]] type. * ''Precedence'': commonly with values "bulk", "junk", or "list"; used to indicate automated "vacation" or "out of office" responses should not be returned for this mail, e.g. to prevent vacation notices from sent to all other subscribers of a mailing list. [[Sendmail]] uses this field to affect prioritization of queued email, with "Precedence: special-delivery" messages delivered sooner. With modern high-bandwidth networks, delivery priority is less of an issue than it was. [[Microsoft Exchange Server|Microsoft Exchange]] respects a fine-grained automatic response suppression mechanism, the ''X-Auto-Response-Suppress'' field.<ref>Microsoft, Auto Response Suppress, 2010, [https://msdn.microsoft.com/en-us/library/ee219609(v=EXCHG.80).aspx Microsoft reference] {{webarchive|url=https://web.archive.org/web/20110407033540/https://msdn.microsoft.com/en-us/library/ee219609(v=EXCHG.80).aspx |date=2011-04-07 }}, 2010 Sep 22</ref> * ''[[Message-ID]]'': Also an automatic-generated field to prevent multiple deliveries and for reference in In-Reply-To: (see below). * ''In-Reply-To'': Message-ID of the message this is a reply to. Used to link related messages together. This field only applies to reply messages. * ''List-Unsubscribe'': HTTP link to unsubscribe from a mailing list. * ''References'': Message-ID of the message this is a reply to, and the message-id of the message the previous reply was a reply to, etc. * ''{{vanchor|Reply-To}}'': Address should be used to reply to the message. * ''Sender'': Address of the sender acting on behalf of the author listed in the From: field (secretary, list manager, etc.). * ''Archived-At'': A direct link to the archived form of an individual email message. The ''To:'' field may be unrelated to the addresses to which the message is delivered. The delivery list is supplied separately to the transport protocol, [[Simple Mail Transfer Protocol|SMTP]], which may be extracted from the header content. The "To:" field is similar to the addressing at the top of a conventional letter delivered according to the address on the outer envelope. In the same way, the "From:" field may not be the sender. Some mail servers apply [[email authentication]] systems to messages relayed. Data pertaining to the server's activity is also part of the header, as defined below. SMTP defines the ''trace information'' of a message saved in the header using the following two fields:<ref>{{cite IETF|title=Simple Mail Transfer Protocol|rfc=5321|author=[[John Klensin]]|sectionname=Trace Information|section=4.4| date=October 2008 |publisher=[[Internet Engineering Task Force|IETF]]}}</ref> * ''Received'': after an SMTP server accepts a message, it inserts this trace record at the top of the header (last to first). * ''Return-Path'': after the delivery SMTP server makes the ''final delivery'' of a message, it inserts this field at the top of the header. Other fields added on top of the header by the receiving server may be called ''trace fields''.<ref>{{cite web|url=https://www.ietf.org/mail-archive/web/apps-discuss/current/msg04115.html|title=Trace headers|author=John Levine|date=14 January 2012|work=email message|publisher=[[Internet Engineering Task Force|IETF]]|access-date=16 January 2012|quote=there are many more trace fields than those two|url-status=live|archive-url=https://web.archive.org/web/20120811135249/https://www.ietf.org/mail-archive/web/apps-discuss/current/msg04115.html|archive-date=11 August 2012}}</ref> * ''Authentication-Results'': after a server verifies authentication, it can save the results in this field for consumption by downstream agents.<ref>This extensible field is defined by {{IETF RFC|7001}}, this also defines an [[Internet Assigned Numbers Authority|IANA]] registry of [https://www.iana.org/assignments/email-auth/ Email Authentication Parameters].</ref> * ''Received-SPF'': stores results of [[Sender Policy Framework|SPF]] checks in more detail than Authentication-Results.<ref>{{IETF RFC|7208}}.</ref> * ''DKIM-Signature'': stores results of [[DomainKeys Identified Mail]] (DKIM) decryption to verify the message was not changed after it was sent.{{ref RFC|6376}} * ''Auto-Submitted'': is used to mark automatic-generated messages.<ref>Defined in {{IETF RFC|3834}}, and updated by {{IETF RFC|5436}}.</ref> * ''VBR-Info'': claims [[Vouch by Reference|VBR]] whitelisting<ref>{{IETF RFC| 5518}}.</ref> ===Message body=== ====Content encoding==== Internet email was designed for 7-bit ASCII.<ref>{{cite book|title=TCP/IP Network Administration|year=2002|isbn=978-0-596-00297-8|author=Craig Hunt|publisher=[[O'Reilly Media]]|page=70}}</ref> Most email software is [[8-bit clean]], but must assume it will communicate with 7-bit servers and mail readers. The [[MIME]] standard introduced character set specifiers and two content transfer encodings to enable transmission of non-ASCII data: [[quoted printable]] for mostly 7-bit content with a few characters outside that range and [[base64]] for arbitrary binary data. The [[8BITMIME]] and [[BINARY]] extensions were introduced to allow transmission of mail without the need for these encodings, but many [[mail transport agent]]s may not support them. In some countries, e-mail software violates {{IETF RFC|5322}} by sending raw<ref group=nb>Not using Internationalized Email or MIME</ref> non-ASCII text and several encoding schemes co-exist; as a result, by default, the message in a non-Latin alphabet language appears in non-readable form (the only exception is a coincidence if the sender and receiver use the same encoding scheme). Therefore, for international [[character set]]s, [[Unicode]] is growing in popularity.<ref>{{Cite web|title=What is unicode? |url=https://www.konfinity.com/what-is-unicode|access-date=2022-01-31|website=Konfinity |archive-date=January 31, 2022|archive-url=https://web.archive.org/web/20220131083432/https://www.konfinity.com/what-is-unicode|url-status=live}}</ref> ====Plain text and HTML==== Most modern graphic [[email client]]s allow the use of either [[plain text]] or [[HTML email|HTML]] for the message body at the option of the user. HTML email messages often include an automatic-generated plain text copy for compatibility. Advantages of HTML include the ability to include in-line links and images, set apart previous messages in [[block quote]]s, wrap naturally on any display, use emphasis such as [[underline]]s and [[italics]], and change [[font]] styles. Disadvantages include the increased size of the email, privacy concerns about [[web bug]]s, abuse of HTML email as a vector for [[phishing]] attacks and the spread of [[malware|malicious software]].<ref>{{cite web|url=https://advosys.ca/papers/mail-policies.html|title=Email policies that prevent viruses|archive-url=https://web.archive.org/web/20070512053927/https://advosys.ca/papers/mail-policies.html |website=Advosys Consulting | archive-date=2007-05-12|url-status=dead}}</ref> Some e-mail clients interpret the body as HTML even in the absence of a <code>Content-Type: html</code> header field; this may cause various problems. Some web-based [[mailing list]]s recommend all posts be made in plain text, with 72 or 80 [[characters per line]] for all the above reasons,<ref>{{cite web |url=https://helpdesk.rootsweb.com/listadmins/plaintext.html |quote=When posting to a RootsWeb mailing list, your message should be sent as "plain text." |publisher=RootsWeb HelpDesk |title=Problem Solving: Sending Messages in Plain Text |access-date=2014-01-09 |url-status=dead |archive-url=https://web.archive.org/web/20140219024856/https://helpdesk.rootsweb.com/listadmins/plaintext.html |archive-date=2014-02-19 }}</ref><ref>{{cite web |url=https://www.openbsd.org/mail.html |title= ''Open''BSD Mailing Lists |quote=Plain text, 72 characters per line |publisher=OpenBSD |access-date=2014-01-09 |url-status=live |archive-url=https://web.archive.org/web/20140208005706/https://openbsd.org/mail.html |archive-date=2014-02-08 }}</ref> and because they have a significant number of readers using [[Comparison of email clients#Text-based|text-based email clients]] such as [[Mutt (email client)|Mutt]]. Various informal conventions evolved for marking up plain text in email and [[usenet]] posts, which later led to the development of formal languages like [[setext]] ''(c. 1992)'' and [[Lightweight markup language|many others]], the most popular of them being [[markdown]]. Some [[Microsoft]] email clients may allow rich formatting using their proprietary [[Rich Text Format]] (RTF), but this should be avoided unless the recipient is guaranteed to have a compatible email client.<ref>{{cite web |url=https://support.microsoft.com/kb/138053 |title=Verhindern, dass die Datei "Winmail.dat" an Internetbenutzer gesendet wird |trans-title=How to Prevent the Winmail.dat File from Being Sent to Internet Users |publisher=Microsoft Support |date=2010-07-02 |access-date=2014-01-09 |url-status=dead |archive-url=https://web.archive.org/web/20140109193922/https://support.microsoft.com/kb/138053 |archive-date=2014-01-09 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)