Appendix A. Example Messages
This section presents a selection of messages. These are intended to assist in the implementation of this specification, but should not be taken as normative; that is to say, although the examples in this section were carefully reviewed, if there happens to be a conflict between these examples and the syntax described in sections 3 and 4 of this document, the syntax in those sections is to be taken as correct.
In the text version of this document, messages in this section are delimited between lines of "----". The "----" lines are not part of the message itself.
Appendix A.1. Addressing Examples
The following are examples of messages that might be sent between two individuals.
Appendix A.1.1. A Message from One Person to Another with Simple Addressing
This could be called a canonical message. It has a single author, John Doe, a single recipient, Mary Smith, a subject, the date, a message identifier, and a textual message in the body.
----
From: John Doe <[email protected]>
To: Mary Smith <[email protected]>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <[email protected]>
This is a message just to say hello.
So, "Hello".
----
If John's secretary Michael actually sent the message, even though John was the author and replies to this message should go back to him, the sender field would be used:
----
From: John Doe <[email protected]>
Sender: Michael Jones <[email protected]>
To: Mary Smith <[email protected]>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <[email protected]>
This is a message just to say hello.
So, "Hello".
----
Appendix A.1.2. Different Types of Mailboxes
This message includes multiple addresses in the destination fields and also uses several different forms of addresses.
----
From: "Joe Q. Public" <[email protected]>
To: Mary Smith <[email protected]>, [email protected], Who? <[email protected]>
Cc: <[email protected]>, "Giant; \"Big\" Box" <[email protected]>
Date: Tue, 1 Jul 2003 10:52:37 +0200
Message-ID: <[email protected]>
Hi everyone.
----
Note that the display names for Joe Q. Public and Giant; "Big" Box needed to be enclosed in double-quotes because the former contains the period and the latter contains both semicolon and double-quote characters (the double-quote characters appearing as quoted-pair constructs). Conversely, the display name for Who? could appear without them because the question mark is legal in an atom. Notice also that [email protected] and [email protected] have no display names associated with them at all, and [email protected] uses the simpler address form without the angle brackets.
Appendix A.1.3. Group Addresses
----
From: Pete <[email protected]>
To: A Group:Ed Jones <[email protected]>,[email protected],John <[email protected]>;
Cc: Undisclosed recipients:;
Date: Thu, 13 Feb 1969 23:32:54 -0330
Message-ID: <[email protected]>
Testing.
----
In this message, the "To:" field has a single group recipient named "A Group", which contains 3 addresses, and a "Cc:" field with an empty group recipient named Undisclosed recipients.
Appendix A.2. Reply Messages
The following is a series of three messages that make up a conversation thread between John and Mary. John first sends a message to Mary, Mary then replies to John's message, and then John replies to Mary's reply message.
Note especially the "Message-ID:", "References:", and "In-Reply-To:" fields in each message.
----
From: John Doe <[email protected]>
To: Mary Smith <[email protected]>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <[email protected]>
This is a message just to say hello.
So, "Hello".
----
When sending replies, the Subject field is often retained, though prepended with "Re: " as described in section 3.6.5.
----
From: Mary Smith <[email protected]>
To: John Doe <[email protected]>
Reply-To: "Mary Smith: Personal Account" <[email protected]>
Subject: Re: Saying Hello
Date: Fri, 21 Nov 1997 10:01:10 -0600
Message-ID: <[email protected]>
In-Reply-To: <[email protected]>
References: <[email protected]>
This is a reply to your hello.
----
Note the "Reply-To:" field in the above message. When John replies to Mary's message above, the reply should go to the address in the "Reply-To:" field instead of the address in the "From:" field.
----
To: "Mary Smith: Personal Account" <[email protected]>
From: John Doe <[email protected]>
Subject: Re: Saying Hello
Date: Fri, 21 Nov 1997 11:00:00 -0600
Message-ID: <[email protected]>
In-Reply-To: <[email protected]>
References: <[email protected]> <[email protected]>
This is a reply to your reply.
----
Appendix A.3. Resent Messages
Start with the message that has been used as an example several times:
----
From: John Doe <[email protected]>
To: Mary Smith <[email protected]>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <[email protected]>
This is a message just to say hello.
So, "Hello".
----
Say that Mary, upon receiving this message, wishes to send a copy of the message to Jane such that (a) the message would appear to have come straight from John; (b) if Jane replies to the message, the reply should go back to John; and (c) all of the original information, like the date the message was originally sent to Mary, the message identifier, and the original addressee, is preserved. In this case, resent fields are prepended to the message:
----
Resent-From: Mary Smith <[email protected]>
Resent-To: Jane Brown <[email protected]>
Resent-Date: Mon, 24 Nov 1997 14:22:01 -0800
Resent-Message-ID: <[email protected]>
From: John Doe <[email protected]>
To: Mary Smith <[email protected]>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <[email protected]>
This is a message just to say hello.
So, "Hello".
----
If Jane, in turn, wished to resend this message to another person, she would prepend her own set of resent header fields to the above and send that. (Note that for brevity, trace fields are not shown.)
Appendix A.4. Messages with Trace Fields
As messages are sent through the transport system as described in [RFC5321], trace fields are prepended to the message. The following is an example of what those trace fields might look like. Note that there is some folding white space in the first one since these lines can be long.
----
Received: from x.y.test
by example.net
via TCP
with ESMTP
id ABC12345
for <[email protected]>; 21 Nov 1997 10:05:43 -0600
Received: from node.example by x.y.test; 21 Nov 1997 10:01:22 -0600
From: John Doe <[email protected]>
To: Mary Smith <[email protected]>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <[email protected]>
This is a message just to say hello.
So, "Hello".
----
Appendix A.5. White Space, Comments, and Other Oddities
White space, including folding white space, and comments can be inserted between many of the tokens of fields. Taking the example from A.1.3, white space and comments can be inserted into all of the fields.
----
From: Pete(A nice \) chap) <pete(his account)@silly.test(his host)>
To:A Group(Some people)
:Chris Jones <c@(Chris's host.)public.example>,
[email protected],
John <[email protected]> (my dear friend); (the end of the group)
Cc:(Empty list)(start)Hidden recipients :(nobody(that I know)) ;
Date: Thu,
13
Feb
1969
23:32
-0330 (Newfoundland Time)
Message-ID: <[email protected]>
Testing.
----
The above example is aesthetically displeasing, but perfectly legal. Note particularly (1) the comments in the "From:" field (including one that has a ")" character appearing as part of a quoted-pair); (2) the white space absent after the ":" in the "To:" field as well as the comment and folding white space after the group name, the special character (".") in the comment in Chris Jones's address, and the folding white space before and after "[email protected],"; (3) the multiple and nested comments in the "Cc:" field as well as the comment immediately following the ":" after "Cc"; (4) the folding white space (but no comments except at the end) and the missing seconds in the time of the date field; and (5) the white space before (but not within) the identifier in the "Message-ID:" field.
Appendix A.6. Obsoleted Forms
The following are examples of obsolete (that is, the "MUST NOT generate") syntactic elements described in section 4 of this document.
Appendix A.6.1. Obsolete Addressing
Note in the example below the lack of quotes around Joe Q. Public, the route that appears in the address for Mary Smith, the two commas that appear in the "To:" field, and the spaces that appear around the "." in the jdoe address.
----
From: Joe Q. Public <[email protected]>
To: Mary Smith <@node.test:[email protected]>, , jdoe@test . example
Date: Tue, 1 Jul 2003 10:52:37 +0200
Message-ID: <[email protected]>
Hi everyone.
----
Appendix A.6.2. Obsolete Dates
The following message uses an obsolete date format, including a non- numeric time zone and a two digit year. Note that although the day- of-week is missing, that is not specific to the obsolete syntax; it is optional in the current syntax as well.
----
From: John Doe <[email protected]>
To: Mary Smith <[email protected]>
Subject: Saying Hello
Date: 21 Nov 97 09:55:06 GMT
Message-ID: <[email protected]>
This is a message just to say hello.
So, "Hello".
----
Appendix A.6.3. Obsolete White Space and Comments
White space and comments can appear between many more elements than in the current syntax. Also, folding lines that are made up entirely of white space are legal.
----
From : John Doe <jdoe@machine(comment). example>
To : Mary Smith
__
<[email protected]>
Subject : Saying Hello
Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600
Message-ID : <1234 @ local(blah) .machine .example>
This is a message just to say hello.
So, "Hello".
----
Note especially the second line of the "To:" field. It starts with two space characters. (Note that "__" represent blank spaces.) Therefore, it is considered part of the folding, as described in section 4.2. Also, the comments and white space throughout addresses, dates, and message identifiers are all part of the obsolete syntax.