Skip to main content

ContentID

property ContentID: string read write;

Example

procedure IdentifyInlinePart(const Part: TIdMessagePart);
begin
Part.ContentID := '<logo@example.invalid>';
end;

Usage

ContentID reads or replaces the first raw Content-ID header value used by Velox to count related parts, without identifier normalization.

Additional Technical Info

ContentID maps directly to the first Content-ID header value. Nonempty assignment adds/replaces it; empty assignment removes the first occurrence. Duplicates can remain and later surface.

The value is stored exactly. Indy does not add angle brackets, validate msg-id syntax, enforce uniqueness or synchronize HTML cid: references. Use a complete application-generated identifier and keep references consistent.

TIdMessageParts.CountParts treats any nonempty visible ContentID as a related part, regardless of MIME type or syntax. Counts are cached only when that method runs; changing this property does not automatically refresh them.

The operation modifies metadata only and issues no network/body action. Header lookup is linear and the part is not thread-safe.

The source-reviewed example uses the reserved .invalid domain and sends no message.

External references

Created 2026-07-15