Click or drag to resize
MimeKit

MimeEntityContentId Property

Get or set the Content-Id.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public string ContentId { get; set; }

Property Value

String
The content identifier.

Implements

IMimeEntityContentId
Exceptions
ExceptionCondition
ObjectDisposedException The MimeEntity has been disposed.
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.

Note  Note
It is recommended that GenerateMessageId or GenerateMessageId(String) be used to generate a valid Content-Id value.
See Also