-
-
Notifications
You must be signed in to change notification settings - Fork 43
Description
RFC 3501 section 7.4.2 has a lot to say about envelopes that would be handy to include in the docs for Envelope. Beyond that though, there are some observations there that I think affect Envelope's types. Specifically:
Note: RFC-2822 requires that all messages have a valid Date header. Therefore, the date member in the envelope can not be NIL or the empty string.
Implies that Envelope::date should not be an Option.
Note: [RFC-2822] requires that the In-Reply-To and Message-ID headers, if present, have non-empty content. Therefore, the in-reply-to and message-id members in the envelope can not be the empty string.
Implies the same for Envelope::in_reply_to and Envelope::message_id.
If the Sender or Reply-To lines are absent in the RFC-2822
header, or are present but empty, the server sets the
corresponding member of the envelope to be the same value as
the from member (the client is not expected to know to do
this).Note: RFC-2822 requires that all messages have a valid
From header. Therefore, the from, sender, and reply-to
members in the envelope can not be NIL.
Implies the same for Envelope::from, Envelope::sender, and Envelope::reply_to.