My software is working with incoming e-mail from the one and only particular sender (let it be [email protected]). According to RFC-2616 section 14 "From" header
MAY be used for logging purposes and as a means for identifying the source of invalid or unwanted requests.
That's exactly what I needed, so I wrote a code, which ignores all the messages where "From" field doesn't equal [email protected]
. It worked good, but one day things changed, and now all the messages form Santa Claus contains a different string in "From" field (exactly <[email protected]>
).
I already fixed my code, but I just wonder, is this header legal? Because the same RFC-2616 section 14 says:
The address SHOULD be machine-usable, as defined by "mailbox" in RFC 822 [9] as updated by RFC 1123 [8]:
From = "From" ":" mailbox
An example is:
From: [email protected]
Note the absense of angle brackets. But at the same time, many e-mail messages I receive on my Gmail account has something like this in the "From" field: "Santa Claus" <[email protected]>
Angle brackets are used when a more human-readable name is also included. Every so often I see email addresses listed like this: Name <[email protected]> or even.
An email address, such as [email protected], is made up from a local-part, the symbol @, and a domain, which may be a domain name or an IP address enclosed in brackets.
Round brackets can help break up the content and make reading easier by separating information within the text. The type of text you would include in brackets could be a clarification, an aside, or a definition or example. You can use round brackets to enclose a single word, a phrase, or even an entire sentence.
The "<" and ">" symbols that are on the comma and period keys on the keyboard. Angle brackets are commonly used to enclose a code of some type. For example, HTML tags and PageMaker tags are enclosed in angle brackets.
RFC-822 allows email addresses to be specified either by a pure email-style address, called an "addr-spec" (e.g., [email protected]
); or by using a nickname ("phrase") with the email-style address (the "addr-spec") enclosed in angle brackets (Foo Bar <[email protected]>
). Your sender has gone from the first format to the second format, although here the nickname part seems to be empty.
By the way, RFC-2616 is for HTTP; you're looking at the definition of an optional, and (I imagine) rarely-used, From: header in the HTTP protocol. That doesn't seem to have any direct relevance on email formats.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With