Click or drag to resize
MimeKit

IMultipart Interface

An interface for a multipart MIME entity which may contain a collection of MIME entities.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public interface IMultipart : IMimeEntity, 
	IDisposable, ICollection<MimeEntity>, IEnumerable<MimeEntity>, 
	IEnumerable, IList<MimeEntity>

The IMultipart type exposes the following members.

Properties
 NameDescription
Public propertyBoundary Get or set the boundary.
Public propertyContentBase Get or set the base content URI.
(Inherited from IMimeEntity)
Public propertyContentDisposition Get or set the content disposition.
(Inherited from IMimeEntity)
Public propertyContentId Get or set the Content-Id.
(Inherited from IMimeEntity)
Public propertyContentLocation Get or set the content location.
(Inherited from IMimeEntity)
Public propertyContentType Get the type of the content.
(Inherited from IMimeEntity)
Public propertyCount
(Inherited from ICollectionMimeEntity)
Public propertyEpilogue Get or set the epilogue.
Public propertyHeaders Get the list of headers.
(Inherited from IMimeEntity)
Public propertyIsAttachment Get a value indicating whether this entity is an attachment.
(Inherited from IMimeEntity)
Public propertyIsReadOnly
(Inherited from ICollectionMimeEntity)
Public propertyItem
(Inherited from IListMimeEntity)
Public propertyPreamble Get or set the preamble.
Top
Methods
 NameDescription
Public methodAccept Dispatches to the specific visit method for this MIME entity.
(Inherited from IMimeEntity)
Public methodAdd
(Inherited from ICollectionMimeEntity)
Public methodClear
(Inherited from ICollectionMimeEntity)
Public methodContains
(Inherited from ICollectionMimeEntity)
Public methodCopyTo
(Inherited from ICollectionMimeEntity)
Public methodDispose
(Inherited from IDisposable)
Public methodGetEnumerator
(Inherited from IEnumerableMimeEntity)
Public methodIndexOf
(Inherited from IListMimeEntity)
Public methodInsert
(Inherited from IListMimeEntity)
Public methodPrepare Prepare the MIME entity for transport using the specified encoding constraints.
(Inherited from IMimeEntity)
Public methodRemove
(Inherited from ICollectionMimeEntity)
Public methodRemoveAt
(Inherited from IListMimeEntity)
Public methodWriteTo(Stream, CancellationToken) Write the IMimeEntity to the specified output stream.
(Inherited from IMimeEntity)
Public methodWriteTo(String, CancellationToken) Write the IMimeEntity to the specified file.
(Inherited from IMimeEntity)
Public methodWriteTo(FormatOptions, Stream, CancellationToken) Write the IMimeEntity to the specified output stream.
(Inherited from IMimeEntity)
Public methodWriteTo(FormatOptions, String, CancellationToken) Write the IMimeEntity to the specified file.
(Inherited from IMimeEntity)
Public methodWriteTo(Stream, Boolean, CancellationToken) Write the IMimeEntity to the specified output stream.
(Inherited from IMimeEntity)
Public methodWriteTo(String, Boolean, CancellationToken) Write the IMimeEntity to the specified file.
(Inherited from IMimeEntity)
Public methodWriteTo(FormatOptions, Stream, Boolean, CancellationToken) Write the IMimeEntity to the specified output stream.
(Inherited from IMimeEntity)
Public methodWriteTo(FormatOptions, String, Boolean, CancellationToken) Write the IMimeEntity to the specified file.
(Inherited from IMimeEntity)
Public methodWriteToAsync(Stream, CancellationToken) Asynchronously write the IMimeEntity to the specified output stream.
(Inherited from IMimeEntity)
Public methodWriteToAsync(String, CancellationToken) Asynchronously write the IMimeEntity to the specified file.
(Inherited from IMimeEntity)
Public methodWriteToAsync(FormatOptions, Stream, CancellationToken) Asynchronously write the IMimeEntity to the specified output stream.
(Inherited from IMimeEntity)
Public methodWriteToAsync(FormatOptions, String, CancellationToken) Asynchronously write the IMimeEntity to the specified file.
(Inherited from IMimeEntity)
Public methodWriteToAsync(Stream, Boolean, CancellationToken) Asynchronously write the IMimeEntity to the specified output stream.
(Inherited from IMimeEntity)
Public methodWriteToAsync(String, Boolean, CancellationToken) Asynchronously write the IMimeEntity to the specified file.
(Inherited from IMimeEntity)
Public methodWriteToAsync(FormatOptions, Stream, Boolean, CancellationToken) Asynchronously write the IMimeEntity to the specified output stream.
(Inherited from IMimeEntity)
Public methodWriteToAsync(FormatOptions, String, Boolean, CancellationToken) Asynchronously write the IMimeEntity to the specified file.
(Inherited from IMimeEntity)
Top
Remarks

All multipart MIME entities will have a Content-Type with a media type of "multipart". The most common multipart MIME entity used in email is the "multipart/mixed" entity.

Four (4) initial subtypes were defined in the original MIME specifications: mixed, alternative, digest, and parallel.

The "multipart/mixed" type is a sort of general-purpose container. When used in email, the first entity is typically the "body" of the message while additional entities are most often file attachments.

Speaking of message "bodies", the "multipart/alternative" type is used to offer a list of alternative formats for the main body of the message (usually they will be "text/plain" and "text/html"). These alternatives are in order of increasing faithfulness to the original document (in other words, the last entity will be in a format that, when rendered, will most closely match what the sending client's WYSISYG editor produced).

The "multipart/digest" type will typically contain a digest of MIME messages and is most commonly used by mailing-list software.

The "multipart/parallel" type contains entities that are all meant to be shown (or heard) in parallel.

Another commonly used type is the "multipart/related" type which contains, as one might expect, inter-related MIME parts which typically reference each other via URIs based on the Content-Id and/or Content-Location headers.

See Also