Tnef Attachment Placeholder Callback Delegate
A TNEF attachment placeholder callback delegate.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The text to write in place of the attachment, or to write nothing.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public delegate string? TnefAttachmentPlaceholderCallback(
TnefAttachment attachment,
MimeEntity? entity
)Parameters
- attachment TnefAttachment
- The TNEF attachment.
- entity MimeEntity
- The MIME entity that the attachment was converted to, or if the attachment was not converted to a MIME entity of its own.
Return Value
StringThe text to write in place of the attachment, or to write nothing.
Remarks
The TnefAttachmentPlaceholderCallback delegate is used by the TNEF to MIME conversion (see AttachmentPlaceholderCallback) to generate the text that is written in place of an attachment when the text/plain and text/html message bodies are generated from an RTF message body. Microsoft Outlook and Exchange mark the position at which each attachment is displayed in an RTF message body with a placeholder, as described by [MS-OXRTFEX] section 2.2.3.4.
A typical implementation returns the attachment's file name or display name, for example "<<" + (attachment.FileName ?? "attachment") + ">>".