IMimeEntityContentId Property

Get or set the Content-Id.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
string? ContentId { get; set; }

Property Value

String
The content identifier.

Remarks

The Content-Id header is used for uniquely identifying a particular entity and uses the same syntax as the Message-Id header on MIME messages.

Setting a Content-Id allows other MimePart objects within the same multipart/related container to reference this part by its unique identifier, typically by using a "cid:" URI in an HTML-formatted message body. This can be useful, for example, when the HTML-formatted message body needs to reference image attachments.

Exceptions

ObjectDisposedException The IMimeEntity has been disposed.

See Also