Class TextPart
A text MIME entity (RFC 2046 §4.1) such as text/plain, text/html, or
text/rtf. The text content is decoded and stored as a string.
Inherited Members
Namespace: DRIT.Mail.Rfc.Mime
Assembly: DRIT.Mail.dll
Syntax
public sealed class TextPart : MimeEntity
Constructors
View SourceTextPart(MimeHeaderCollection, ContentType, ContentDisposition?, string?, ContentTransferEncoding, string, Encoding)
Initializes a new instance of the TextPart class.
Declaration
public TextPart(MimeHeaderCollection headers, ContentType contentType, ContentDisposition? contentDisposition, string? contentId, ContentTransferEncoding transferEncoding, string text, Encoding encoding)
Parameters
| Type | Name | Description |
|---|---|---|
| MimeHeaderCollection | headers | |
| ContentType | contentType | |
| ContentDisposition | contentDisposition | |
| string | contentId | |
| ContentTransferEncoding | transferEncoding | |
| string | text | |
| Encoding | encoding |
Properties
View SourceEncoding
Gets the charset encoding used to decode the text.
Declaration
public Encoding Encoding { get; }
Property Value
| Type | Description |
|---|---|
| Encoding |
IsHtml
Gets a value indicating whether this is text/html.
Declaration
public bool IsHtml { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsPlain
Gets a value indicating whether this is text/plain.
Declaration
public bool IsPlain { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsRtf
Gets a value indicating whether this is text/rtf.
Declaration
public bool IsRtf { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Text
Gets the decoded text content.
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| string |