Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

MimeEntity Class

Namespace: Rebex.Mime
Assembly: Rebex.Mail.dll (version 7.0.9147)

A MIME entity.

Syntax
public class MimeEntity
Inheritance
Object
MimeEntity
MimeMessage
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()

Remarks

Use MimeMessage to represent a top-level MIME message.

Constructors

Name Description
MimeEntity()

Initializes a new instance of MimeEntity.

Properties

Name Description
CertificateFinder

Gets or sets the ICertificateFinder to be used to find certificates used to encrypt or sign the entity.

Charset

Gets the charset (Encoding) of the content of this entity.

ContentDescription

Gets or sets the content description of this entity.

ContentDisposition

Gets or sets the content disposition of this entity.

ContentId

Gets or sets the content ID of this entity.

ContentLocation

Gets or sets the content location of this entity.

ContentMessage

Gets the inner message of a 'message/rfc822' entity.

ContentString

Gets the content string of this entity.

ContentTransferEncoding

Gets or sets the content transfer encoding of this entity.

ContentType

Gets or sets the content type of this entity.

DefaultCharset

Gets or sets the default charset for MIME body and headers.

EnvelopedContentInfo

Gets the EnvelopedData object that contains information about enveloped (encrypted) content. This property is only set for entities with enveloped content.

Epilogue

Gets or sets the epilogue of this multipart entity.

Headers

Gets the list of headers of this entity.

IsMultipart

Determines whether the entity is a multipart entity.

Kind

Gets the type of the entity.

Name

Gets or sets the suggested file name of this entity, if it is present.

Options

Gets or sets various options for MIME parser and writer.

Parent

Gets or sets the parent of this entity.

Parts

Gets the list of child parts of this entity.

Preamble

Gets or sets the preamble of this multipart entity.

ReadOnly

Gets or sets a value indicating whether the entity is read-only.

SignatureStyle

Gets or sets the signature style of a signed entity container. This property is only intended for entities with signed content.

SignedContentInfo

Gets the SignedData object that contains information about signed content. This property is only set for entities with signed content.

Silent

Gets or sets a value indicating whether cryptographic providers are allowed to display any user interface (UI) when working with private keys.

TransferEncoding

Gets or sets the TransferEncoding of the content of this entity.

Methods

Name Description
Clone()

Creates a copy of this entity.

Decrypt()

Decrypts the contents of an enveloped entity. This method is only intended for entities with enveloped content.

Encrypt()

Encrypts the contents of an enveloped entity. This method is only intended for entities with enveloped content.

GetContentStream()

Returns the read-only stream representing a content of this entity.

GetContentStream(Boolean)

Returns the stream representing a content of this entity.

GetRawContentStream()

Returns the read-only stream representing a raw content of this entity. Only available for messages that were parsed with MimeOptions.KeepRawEntityBody flag. You probably need to use GetContentStream(Boolean) instead.

GetSignatureEntity()

Gets the signature entity if available. This can return this entity for signatures with inlined content.

Load(Stream)

Loads the MIME entity from the specified stream.

Load(String)

Loads the MIME entity from the specified file.

OnBrokenHeader(MimeUnparsableHeaderEventArgs)

Raises the UnparsableHeader event.

Save(Stream)

Saves the MIME entity to the specified stream.

Save(String)

Saves the MIME entity to the specified file.

SetContent(MimeEntity)

Sets the inner message of this entity to the specified message.

SetContent(Stream)

Sets the content of this entity to data read from the specified stream.

SetContent(Stream, String)

Sets the content of this entity to data read from the specified stream and sets media type and file name.

SetContent(Stream, String, String)

Sets the content of this entity to data read from the specified stream and sets media type and file name.

SetContent(Stream, String, String, TransferEncoding)

Sets the content of this entity to data read from the specified stream and sets media type, file name and transfer encoding.

SetContent(String)

Sets the content of this entity to the specified text.

SetContent(String, String)

Sets the content of this entity to the specified text and media type.

SetContent(String, String, Encoding)

Sets the content of this entity to the specified text, media type and character set.

SetContent(String, String, Encoding, TransferEncoding)

Sets the content of this entity to the specified text, media type and character set.

SetContentFromFile(String)

Sets the content of this entity to data read from the specified file.

SetContentFromFile(String, String)

Sets the content of this entity to data read from the specified file and sets file name.

SetContentFromFile(String, String, String)

Sets the content of this entity to data read from the specified file and sets media type and file name.

SetContentFromFile(String, String, String, TransferEncoding)

Sets the content of this entity to data read from the specified file and sets media type, file name and transfer encoding.

SetEnvelopedContent(MimeEntity, Certificate[])

Sets the content of this entity to the specified enveloped entity.

SetEnvelopedContent(MimeEntity, SymmetricKeyAlgorithmId, EncryptionParameters, Certificate[])

Sets the content of this entity to the specified enveloped entity.

SetEnvelopedContent(MimeEntity, SymmetricKeyAlgorithmId, Nullable<Int32>, EncryptionParameters, Certificate[])

Sets the content of this entity to the specified enveloped entity.

SetEnvelopedContent(MimeEntity, String, Certificate[])

Sets the content of this entity to the specified enveloped entity.

SetEnvelopedContent(MimeEntity, String, EncryptionParameters, Certificate[])

Sets the content of this entity to the specified enveloped entity.

SetSignedContent(MimeEntity, MimeSignatureStyle, Certificate[])

Sets the content of this entity to the specified signed content.

SetSignedContent(MimeEntity, MimeSignatureStyle, SignatureHashAlgorithm, Certificate[])

Sets the content of this entity to the specified signed content.

SetSignedContent(MimeEntity, MimeSignatureStyle, SignatureParameters, Certificate[])

Sets the content of this entity to the specified signed content.

SetSignedContent(MimeEntity, Certificate[])

Sets the content of this entity to the specified signed entity.

SetSignedContent(MimeEntity, SignatureParameters, Certificate[])

Sets the content of this entity to the specified signed content.

Sign()

Creates signatures for all signers that do not have one yet. This method is only intended for entities with signed content.

ToMessage()

Coverts the MimeEntity into a MimeMessage.

ToStream()

Returns a read-only stream that can be used to read the raw MIME message content. Copying all the content into another stream is identical to Save(Stream) method.

ValidateSignature()

Validates all digital signatures on this CMS/PKCS #7 signed message and validates all the signers' certificates. This method is only intended for entities with signed content.

ValidateSignature(Boolean, ValidationOptions)

Validates all digital signatures on this CMS/PKCS #7 signed message. Optionally, no signers' certificates are not validated, and the specified validation options are taken into account. This method is only intended for entities with signed content.

ValidateSignature(Boolean, ValidationOptions, CertificateChainEngine)

Validates all digital signatures on this CMS/PKCS #7 signed message. Optionally, no signers' certificates are not validated, and the specified validation options are taken into account. This method is only intended for entities with signed content.

Events

Name Description
ParsingHeader

Occurs when a MIME header is to be parsed.

UnparsableHeader

Occurs when an unparsable header is encountered while parsing a MIME message.

In This Article
  • Remarks
  • Constructors
  • Properties
  • Methods
  • Events
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies