3

From reading the RFC it appears that CID can/must only contain characters from the same set as those permissable by a regular URI. Is this correct. Im asking because I wish to writeup a simple helper that takes a CIDs prefix and adds a counter when generating CID for mime multitypes attachments.

james.garriss
  • 12,959
  • 7
  • 83
  • 96
mP.
  • 18,002
  • 10
  • 71
  • 105

1 Answers1

3

The Content-ID value is required to be in the form of an RFC-822 addr-spec (user@domain).

Since an addr-spec may contain characters not allowed in a URL, those characters are hex-encoded when used in the "cid" URL.

Per RFC2392:

A "cid" URL is converted to the corresponding Content-ID message header [MIME] by
removing the "cid:" prefix, converting the % encoded character to their equivalent US-ASCII characters, and enclosing the remaining parts with an angle bracket pair, "<" and ">".

Read more: http://www.faqs.org/rfcs/rfc2392.html

David Gelhar
  • 27,873
  • 3
  • 67
  • 84