MessageHeader
Overview
The MessageHeader class holds all headers for a MessagePart class.
All MIME headers are described in more details in the corresponding MIME specifications.
Known Headers can be accessed via properties of the class after initialization when processed MIME message is actually an email message.
Headers which are unknown to the parser will be held in the UnknownHeaders collection. In any case any property, either known or unknown, can be accessed by its name with the class indexer.
This class is a part of the MIME parser implemented in the Internet Pack and there is no need to instantiate this class directly.
For internal use only.
Location
-
Reference:
- RemObjects.InternetPack.dll .NET, .NET Core 5.0, .NET Standard 2.0
- RemObjects.InternetPack.fx Island
- libRemObjects.InternetPack.fx Toffee
- Namespace: RemObjects.InternetPack.Messages.Mime.Header
constructor
constructor
MessageHeader()
init()
Sub New()
constructor (NameValueCollection)
constructor(headers: NameValueCollection)
MessageHeader(NameValueCollection headers)
init(_ headers: NameValueCollection)
Sub New(headers As NameValueCollection)
Parameters:
- headers:
Bcc virtual
Gets or sets the collection of Blind Carbon Copy email adresses.
This email adresses collection specifies who got a copy of the message, but others cannot see who these persons are. The colelction will be empty if no Received Bcc header was present in the processed MIME message.
property Bcc: MessageAddresses read write;
MessageAddresses Bcc { get; set; }
var Bcc: MessageAddresses { get{} set{} }
Property Bcc() As MessageAddresses
Cc virtual
Gets the collection of Carbon Copy email adresses.
This email adresses collection specifies who got a copy of the message. The colelction will be empty if no Cc header was present in the processed MIME message.
property Cc: MessageAddresses read write;
MessageAddresses Cc { get; set; }
var Cc: MessageAddresses { get{} set{} }
Property Cc() As MessageAddresses
ContentDescription virtual
Gets the value of the Content-Description MIME header.
This header is intended to contain a human readable description of the body.
property ContentDescription: String read write;
String ContentDescription { get; set; }
var ContentDescription: String { get{} set{} }
Property ContentDescription() As String
ContentDisposition virtual
Gets or sets the value of the ContentDisposition MIME header.
This header describes presentation style of the received content (ie is it an inline content or an attachment file)
property ContentDisposition: ContentDisposition read write;
ContentDisposition ContentDisposition { get; set; }
var ContentDisposition: ContentDisposition { get{} set{} }
Property ContentDisposition() As ContentDisposition
ContentId virtual
Gets or sets identifier of the content part (like an attached image).
Value of this property is used in multipart MIME messages.
property ContentId: String read write;
String ContentId { get; set; }
var ContentId: String { get{} set{} }
Property ContentId() As String
ContentTransferEncoding virtual
Gets content transfer encoding (ie base64, quoted-printable etc).
property ContentTransferEncoding: ContentTransferEncoding read write;
ContentTransferEncoding ContentTransferEncoding { get; set; }
var ContentTransferEncoding: ContentTransferEncoding { get{} set{} }
Property ContentTransferEncoding() As ContentTransferEncoding
ContentType virtual
Gets or sets the value if the Content-Type MIME header.
The default value of this property is application/atom+xm.
property ContentType: ContentType read write;
ContentType ContentType { get; set; }
var ContentType: ContentType { get{} set{} }
Property ContentType() As ContentType
Date virtual
Gets or sets the date when the email was sent (raw value).
Note that changes of the Date property value aren't automatically reflected in the DateSent property value (and vice versa).
property Date: String read write;
String Date { get; set; }
var Date: String { get{} set{} }
Property Date() As String
DateSent virtual
Gets the date when the email was sent (parsed value).
Note that changes of the Date property value aren't automatically reflected in the DateSent property value (and vice versa).
property DateSent: DateTime read write;
DateTime DateSent { get; set; }
var DateSent: DateTime { get{} set{} }
Property DateSent() As DateTime
description override Toffee
func description() -> NSString
DispositionNotificationTo virtual
property DispositionNotificationTo: MessageAddresses read write;
MessageAddresses DispositionNotificationTo { get; set; }
var DispositionNotificationTo: MessageAddresses { get{} set{} }
Property DispositionNotificationTo() As MessageAddresses
From virtual
Gets or sets the email sender's address.
property From: MessageAddress read write;
MessageAddress From { get; set; }
var From: MessageAddress { get{} set{} }
Property From() As MessageAddress
Importance virtual
Ges or sets the priority of this email.
property Importance: MailPriority read write;
MailPriority Importance { get; set; }
var Importance: MailPriority { get{} set{} }
Property Importance() As MailPriority
InReplyTo virtual
Gets or sets the message identifier(s) of the original message(s) (one that was replied with the current message).
property InReplyTo: List<String> read write;
List<String> InReplyTo { get; set; }
var InReplyTo: List<String> { get{} set{} }
Property InReplyTo() As List<String>
Item virtual
Gets values of the MIME headers. Headers are accessed by their names.
Changes made via this property are reflected by changes of the corresponging properties (ie changing value of the Content-Disposition header results in corresponding changes of the ContentDisposition property.
property Item[name: String]: String read write;
String Item[String name] { get; set; }
subscript Item(_ name: String) -> String { get{} set{} }
Property Item(name As String) As String
Keywords virtual
Gets a list of the message keywords.
property Keywords: List<String> read write;
List<String> Keywords { get; set; }
var Keywords: List<String> { get{} set{} }
Property Keywords() As List<String>
MessageId virtual
Gets or sets the unique identifier of the MIME message.
property MessageId: String read write;
String MessageId { get; set; }
var MessageId: String { get{} set{} }
Property MessageId() As String
MimeVersion virtual
Gets the MIME version.
The default value of this property is 1.0.
property MimeVersion: String read write;
String MimeVersion { get; set; }
var MimeVersion: String { get{} set{} }
Property MimeVersion() As String
ParseHeader virtual
Parses a single MIME header and sets according property value.
method ParseHeader(headerName: String; headerValue: String)
void ParseHeader(String headerName, String headerValue)
func ParseHeader(_ headerName: String, _ headerValue: String)
Sub ParseHeader(headerName As String, headerValue As String)
Parameters:
- headerName: MIME header name.
- headerValue: MIME header value in unfolded state (ie as one line).
Received virtual
Gets or sets the collection describing the email delivery path.
property Received: List<String> read write;
List<String> Received { get; set; }
var Received: List<String> { get{} set{} }
Property Received() As List<String>
References virtual
Gets the collection of the message identifier(s) of other message(s) being referenced by the current one.
property References: List<String> read write;
List<String> References { get; set; }
var References: List<String> { get{} set{} }
Property References() As List<String>
ReplyTo virtual
Gets the email address that shuld receive a reply to the current message.
property ReplyTo: MessageAddress read write;
MessageAddress ReplyTo { get; set; }
var ReplyTo: MessageAddress { get{} set{} }
Property ReplyTo() As MessageAddress
RequestLine virtual
Gets the request line of the message part, f.e. POST /article/add HTTP/1.1.
property RequestLine: String read write;
String RequestLine { get; set; }
var RequestLine: String { get{} set{} }
Property RequestLine() As String
ReturnPath virtual
Gets the email address that shuld receive a reply to the current message. Should contain a single MessageAddress with no username inside.
property ReturnPath: MessageAddress read write;
MessageAddress ReturnPath { get; set; }
var ReturnPath: MessageAddress { get{} set{} }
Property ReturnPath() As MessageAddress
Sender virtual
Gets or sets the email address of the sender of the current message.
property Sender: MessageAddress read write;
MessageAddress Sender { get; set; }
var Sender: MessageAddress { get{} set{} }
Property Sender() As MessageAddress
Store virtual
Stores MIME header names and values in the provided StringBuilder instance.
method Store(sb: StringBuilder)
void Store(StringBuilder sb)
func Store(_ sb: StringBuilder)
Sub Store(sb As StringBuilder)
Parameters:
- sb: The StringBuilder.
Subject virtual
Gets or sets the current email message's subject line.
property Subject: String read write;
String Subject { get; set; }
var Subject: String { get{} set{} }
Property Subject() As String
To virtual
Gets the receiver of the current email message.
property To: MessageAddresses read write;
MessageAddresses To { get; set; }
var To: MessageAddresses { get{} set{} }
Property To() As MessageAddresses
ToString virtual
Outputs result of the the Store method.
method ToString: PlatformString
PlatformString ToString()
func ToString() -> String
Function ToString() As PlatformString
UnknownHeaders virtual
Gets a collection of all unrecognized MIME headers.
property UnknownHeaders: NameValueCollection read write;
NameValueCollection UnknownHeaders { get; set; }
var UnknownHeaders: NameValueCollection { get{} set{} }
Property UnknownHeaders() As NameValueCollection
Bcc virtual
Gets or sets the collection of Blind Carbon Copy email adresses.
This email adresses collection specifies who got a copy of the message, but others cannot see who these persons are. The colelction will be empty if no Received Bcc header was present in the processed MIME message.
property Bcc: MessageAddresses read write;
MessageAddresses Bcc { get; set; }
var Bcc: MessageAddresses { get{} set{} }
Property Bcc() As MessageAddresses
Cc virtual
Gets the collection of Carbon Copy email adresses.
This email adresses collection specifies who got a copy of the message. The colelction will be empty if no Cc header was present in the processed MIME message.
property Cc: MessageAddresses read write;
MessageAddresses Cc { get; set; }
var Cc: MessageAddresses { get{} set{} }
Property Cc() As MessageAddresses
ContentDescription virtual
Gets the value of the Content-Description MIME header.
This header is intended to contain a human readable description of the body.
property ContentDescription: String read write;
String ContentDescription { get; set; }
var ContentDescription: String { get{} set{} }
Property ContentDescription() As String
ContentDisposition virtual
Gets or sets the value of the ContentDisposition MIME header.
This header describes presentation style of the received content (ie is it an inline content or an attachment file)
property ContentDisposition: ContentDisposition read write;
ContentDisposition ContentDisposition { get; set; }
var ContentDisposition: ContentDisposition { get{} set{} }
Property ContentDisposition() As ContentDisposition
ContentId virtual
Gets or sets identifier of the content part (like an attached image).
Value of this property is used in multipart MIME messages.
property ContentId: String read write;
String ContentId { get; set; }
var ContentId: String { get{} set{} }
Property ContentId() As String
ContentTransferEncoding virtual
Gets content transfer encoding (ie base64, quoted-printable etc).
property ContentTransferEncoding: ContentTransferEncoding read write;
ContentTransferEncoding ContentTransferEncoding { get; set; }
var ContentTransferEncoding: ContentTransferEncoding { get{} set{} }
Property ContentTransferEncoding() As ContentTransferEncoding
ContentType virtual
Gets or sets the value if the Content-Type MIME header.
The default value of this property is application/atom+xm.
property ContentType: ContentType read write;
ContentType ContentType { get; set; }
var ContentType: ContentType { get{} set{} }
Property ContentType() As ContentType
Date virtual
Gets or sets the date when the email was sent (raw value).
Note that changes of the Date property value aren't automatically reflected in the DateSent property value (and vice versa).
property Date: String read write;
String Date { get; set; }
var Date: String { get{} set{} }
Property Date() As String
DateSent virtual
Gets the date when the email was sent (parsed value).
Note that changes of the Date property value aren't automatically reflected in the DateSent property value (and vice versa).
property DateSent: DateTime read write;
DateTime DateSent { get; set; }
var DateSent: DateTime { get{} set{} }
Property DateSent() As DateTime
DispositionNotificationTo virtual
property DispositionNotificationTo: MessageAddresses read write;
MessageAddresses DispositionNotificationTo { get; set; }
var DispositionNotificationTo: MessageAddresses { get{} set{} }
Property DispositionNotificationTo() As MessageAddresses
From virtual
Gets or sets the email sender's address.
property From: MessageAddress read write;
MessageAddress From { get; set; }
var From: MessageAddress { get{} set{} }
Property From() As MessageAddress
Importance virtual
Ges or sets the priority of this email.
property Importance: MailPriority read write;
MailPriority Importance { get; set; }
var Importance: MailPriority { get{} set{} }
Property Importance() As MailPriority
InReplyTo virtual
Gets or sets the message identifier(s) of the original message(s) (one that was replied with the current message).
property InReplyTo: List<String> read write;
List<String> InReplyTo { get; set; }
var InReplyTo: List<String> { get{} set{} }
Property InReplyTo() As List<String>
Item virtual
Gets values of the MIME headers. Headers are accessed by their names.
Changes made via this property are reflected by changes of the corresponging properties (ie changing value of the Content-Disposition header results in corresponding changes of the ContentDisposition property.
property Item[name: String]: String read write;
String Item[String name] { get; set; }
subscript Item(_ name: String) -> String { get{} set{} }
Property Item(name As String) As String
Keywords virtual
Gets a list of the message keywords.
property Keywords: List<String> read write;
List<String> Keywords { get; set; }
var Keywords: List<String> { get{} set{} }
Property Keywords() As List<String>
MessageId virtual
Gets or sets the unique identifier of the MIME message.
property MessageId: String read write;
String MessageId { get; set; }
var MessageId: String { get{} set{} }
Property MessageId() As String
MimeVersion virtual
Gets the MIME version.
The default value of this property is 1.0.
property MimeVersion: String read write;
String MimeVersion { get; set; }
var MimeVersion: String { get{} set{} }
Property MimeVersion() As String
Received virtual
Gets or sets the collection describing the email delivery path.
property Received: List<String> read write;
List<String> Received { get; set; }
var Received: List<String> { get{} set{} }
Property Received() As List<String>
References virtual
Gets the collection of the message identifier(s) of other message(s) being referenced by the current one.
property References: List<String> read write;
List<String> References { get; set; }
var References: List<String> { get{} set{} }
Property References() As List<String>
ReplyTo virtual
Gets the email address that shuld receive a reply to the current message.
property ReplyTo: MessageAddress read write;
MessageAddress ReplyTo { get; set; }
var ReplyTo: MessageAddress { get{} set{} }
Property ReplyTo() As MessageAddress
RequestLine virtual
Gets the request line of the message part, f.e. POST /article/add HTTP/1.1.
property RequestLine: String read write;
String RequestLine { get; set; }
var RequestLine: String { get{} set{} }
Property RequestLine() As String
ReturnPath virtual
Gets the email address that shuld receive a reply to the current message. Should contain a single MessageAddress with no username inside.
property ReturnPath: MessageAddress read write;
MessageAddress ReturnPath { get; set; }
var ReturnPath: MessageAddress { get{} set{} }
Property ReturnPath() As MessageAddress
Sender virtual
Gets or sets the email address of the sender of the current message.
property Sender: MessageAddress read write;
MessageAddress Sender { get; set; }
var Sender: MessageAddress { get{} set{} }
Property Sender() As MessageAddress
Subject virtual
Gets or sets the current email message's subject line.
property Subject: String read write;
String Subject { get; set; }
var Subject: String { get{} set{} }
Property Subject() As String
To virtual
Gets the receiver of the current email message.
property To: MessageAddresses read write;
MessageAddresses To { get; set; }
var To: MessageAddresses { get{} set{} }
Property To() As MessageAddresses
UnknownHeaders virtual
Gets a collection of all unrecognized MIME headers.
property UnknownHeaders: NameValueCollection read write;
NameValueCollection UnknownHeaders { get; set; }
var UnknownHeaders: NameValueCollection { get{} set{} }
Property UnknownHeaders() As NameValueCollection
constructor
constructor
MessageHeader()
init()
Sub New()
constructor (NameValueCollection)
constructor(headers: NameValueCollection)
MessageHeader(NameValueCollection headers)
init(_ headers: NameValueCollection)
Sub New(headers As NameValueCollection)
Parameters:
- headers:
description override Toffee
func description() -> NSString
ParseHeader virtual
Parses a single MIME header and sets according property value.
method ParseHeader(headerName: String; headerValue: String)
void ParseHeader(String headerName, String headerValue)
func ParseHeader(_ headerName: String, _ headerValue: String)
Sub ParseHeader(headerName As String, headerValue As String)
Parameters:
- headerName: MIME header name.
- headerValue: MIME header value in unfolded state (ie as one line).
Store virtual
Stores MIME header names and values in the provided StringBuilder instance.
method Store(sb: StringBuilder)
void Store(StringBuilder sb)
func Store(_ sb: StringBuilder)
Sub Store(sb As StringBuilder)
Parameters:
- sb: The StringBuilder.
ToString virtual
Outputs result of the the Store method.
method ToString: PlatformString
PlatformString ToString()
func ToString() -> String
Function ToString() As PlatformString
- External links ** MIME