What are the valid characters for the Mime Multipart ContentId "CID:" message?

From reading the RFC, it appears that the CID can / should only contain characters from the same set as valid using a regular URI. It's right. I ask because I want to write a simple helper that takes a CID prefix and adds a counter when creating a CID for mime multitypes attachments.

+3
source share
1 answer

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

Since addr-spec may contain characters that are not allowed in the URL, these characters are encoded in hexadecimal if used in the cid URL.

In RFC2392:

URL- "cid" Content-ID header [MIME]

     "cid:", % encoded     US-ASCII, - ,      "& ;" " > ".

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

+3

Source: https://habr.com/ru/post/1740411/


All Articles