tags:

views:

21

answers:

2

Section 2.2 of RFC 2822 defined e-mail message header fields. However it doesn't say explicitly if the header name should be interpreted in case-sensitive or case-insensitive manner.

For example, if I want to find the "Carbon Copy" section should I look for "Cc:" in case sensitive manner? Or if a message already has "Cc:" field can it also have "CC:" field? Does the requirement to interpret fields name in case-sensitive or case-insensitive manner apply to all or only select fields?

+1  A: 

If the RFC doesn't define it, it is left as an implementation detail.

To be safe, I would go with case-insensitive to allow for different implementations to work without failing.

By the way, RFC 2822 has been obsoleted by RFC 5322 (which also has no such discussion).

Oded
+1  A: 

From my experience you should use case insensitive checks as different clients/servers do different things with the headers.

Nir Levy