![]() | MultipartReport Class |
Namespace: MimeKit
public class MultipartReport : Multipart
The MultipartReport type exposes the following members.
Name | Description | |
---|---|---|
![]() | MultipartReport(MimeEntityConstructorArgs) |
Initialize a new instance of the MultipartReport class.
|
![]() | MultipartReport(String) |
Initialize a new instance of the MultipartReport class.
|
![]() | MultipartReport(String, Object) |
Initialize a new instance of the MultipartReport class.
|
Name | Description | |
---|---|---|
![]() | Boundary |
Get or set the boundary.
(Inherited from Multipart.) |
![]() | ContentBase |
Gets or sets the base content URI.
(Inherited from MimeEntity.) |
![]() | ContentDisposition |
Gets or sets the content disposition.
(Inherited from MimeEntity.) |
![]() | ContentId |
Gets or sets the content identifier.
(Inherited from MimeEntity.) |
![]() | ContentLocation |
Gets or sets the content location.
(Inherited from MimeEntity.) |
![]() | ContentType |
Gets the type of the content.
(Inherited from MimeEntity.) |
![]() | Count |
Get the number of parts in the multipart.
(Inherited from Multipart.) |
![]() | Epilogue |
Get or set the epilogue.
(Inherited from Multipart.) |
![]() | Headers |
Gets the list of headers.
(Inherited from MimeEntity.) |
![]() | IsAttachment |
Gets a value indicating whether this MimePart is an attachment.
(Inherited from MimeEntity.) |
![]() | IsReadOnly |
Get a value indicating whether this instance is read only.
(Inherited from Multipart.) |
![]() | Item |
Get or set the MimeEntity at the specified index.
(Inherited from Multipart.) |
![]() | Preamble |
Get or set the preamble.
(Inherited from Multipart.) |
![]() ![]() | ReportType |
Gets or sets the type of the report.
|
Name | Description | |
---|---|---|
![]() | Accept |
Dispatches to the specific visit method for this MIME entity.
(Overrides MultipartAccept(MimeVisitor).) |
![]() | Add |
Add an entity to the multipart.
(Inherited from Multipart.) |
![]() | Clear |
Clear a multipart.
(Inherited from Multipart.) |
![]() | Clear(Boolean) |
Clear a multipart.
(Inherited from Multipart.) |
![]() | Contains |
Check if the Multipart contains the specified entity.
(Inherited from Multipart.) |
![]() | CopyTo |
Copy all of the entities in the Multipart to the specified array.
(Inherited from Multipart.) |
![]() | Dispose |
Releases all resources used by the MimeEntity object.
(Inherited from MimeEntity.) |
![]() | Dispose(Boolean) |
Releases the unmanaged resources used by the Multipart and
optionally releases the managed resources.
(Inherited from Multipart.) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize |
Releases unmanaged resources and performs other cleanup operations before the
MimeEntity is reclaimed by garbage collection.
(Inherited from MimeEntity.) |
![]() | GetEnumerator |
Get the enumerator for the children of the Multipart.
(Inherited from Multipart.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | IndexOf |
Get the index of an entity.
(Inherited from Multipart.) |
![]() | Insert |
Insert an entity into the Multipart at the specified index.
(Inherited from Multipart.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnHeadersChanged |
Called when the headers change in some way.
(Inherited from MimeEntity.) |
![]() | Prepare |
Prepare the MIME entity for transport using the specified encoding constraints.
(Inherited from Multipart.) |
![]() | Remove |
Remove an entity from the multipart.
(Inherited from Multipart.) |
![]() | RemoveAt |
Remove an entity from the Multipart at the specified index.
(Inherited from Multipart.) |
![]() | RemoveHeader |
Remove a header by name.
(Inherited from MimeEntity.) |
![]() | SetHeader(String, Byte) |
Set the value of a header using the raw value.
(Inherited from MimeEntity.) |
![]() | SetHeader(String, String) |
Set the value of a header.
(Inherited from MimeEntity.) |
![]() | ToString |
Returns a String that represents the MimeEntity for debugging purposes.
(Inherited from MimeEntity.) |
![]() | TryInit |
Tries to use the given object to initialize the appropriate property.
(Inherited from MimeEntity.) |
![]() | WriteTo(Stream, CancellationToken) |
Write the MimeEntity to the specified output stream.
(Inherited from MimeEntity.) |
![]() | WriteTo(String, CancellationToken) |
Write the MimeEntity to the specified file.
(Inherited from MimeEntity.) |
![]() | WriteTo(FormatOptions, Stream, CancellationToken) |
Write the MimeEntity to the specified output stream.
(Inherited from MimeEntity.) |
![]() | WriteTo(FormatOptions, String, CancellationToken) |
Write the MimeEntity to the specified file.
(Inherited from MimeEntity.) |
![]() | WriteTo(Stream, Boolean, CancellationToken) |
Write the MimeEntity to the specified output stream.
(Inherited from MimeEntity.) |
![]() | WriteTo(String, Boolean, CancellationToken) |
Write the MimeEntity to the specified file.
(Inherited from MimeEntity.) |
![]() | WriteTo(FormatOptions, String, Boolean, CancellationToken) |
Write the MimeEntity to the specified file.
(Inherited from MimeEntity.) |
![]() | WriteTo(FormatOptions, Stream, Boolean, CancellationToken) |
Write the Multipart to the specified output stream.
(Inherited from Multipart.) |
![]() | WriteToAsync(Stream, CancellationToken) |
Asynchronously write the MimeEntity to the specified output stream.
(Inherited from MimeEntity.) |
![]() | WriteToAsync(String, CancellationToken) |
Asynchronously write the MimeEntity to the specified file.
(Inherited from MimeEntity.) |
![]() | WriteToAsync(FormatOptions, Stream, CancellationToken) |
Asynchronously write the MimeEntity to the specified output stream.
(Inherited from MimeEntity.) |
![]() | WriteToAsync(FormatOptions, String, CancellationToken) |
Asynchronously write the MimeEntity to the specified file.
(Inherited from MimeEntity.) |
![]() | WriteToAsync(Stream, Boolean, CancellationToken) |
Asynchronously write the MimeEntity to the specified output stream.
(Inherited from MimeEntity.) |
![]() | WriteToAsync(String, Boolean, CancellationToken) |
Asynchronously write the MimeEntity to the specified file.
(Inherited from MimeEntity.) |
![]() | WriteToAsync(FormatOptions, String, Boolean, CancellationToken) |
Asynchronously write the MimeEntity to the specified file.
(Inherited from MimeEntity.) |
![]() | WriteToAsync(FormatOptions, Stream, Boolean, CancellationToken) |
Asynchronously write the Multipart to the specified output stream.
(Inherited from Multipart.) |
public void ProcessDeliveryStatusNotification (MimeMessage message) { var report = message.Body as MultipartReport; if (report == null || report.ReportType == null || !report.ReportType.Equals ("delivery-status", StringComparison.OrdinalIgnoreCase)) { // this is not a delivery status notification message... return; } // process the report foreach (var mds in report.OfType<MessageDeliveryStatus> ()) { // process the status groups - each status group represents a different recipient // The first status group contains information about the message var envelopeId = mds.StatusGroups[0]["Original-Envelope-Id"]; // all of the other status groups contain per-recipient information for (int i = 1; i < mds.StatusGroups.Length; i++) { var recipient = mds.StatusGroups[i]["Original-Recipient"]; var action = mds.StatusGroups[i]["Action"]; if (recipient == null) recipient = mds.StatusGroups[i]["Final-Recipient"]; // the recipient string should be in the form: "rfc822;user@domain.com" var index = recipient.IndexOf (';'); var address = recipient.Substring (index + 1); switch (action) { case "failed": Console.WriteLine ("Delivery of message {0} failed for {1}", envelopeId, address); break; case "delayed": Console.WriteLine ("Delivery of message {0} has been delayed for {1}", envelopeId, address); break; case "delivered": Console.WriteLine ("Delivery of message {0} has been delivered to {1}", envelopeId, address); break; case "relayed": Console.WriteLine ("Delivery of message {0} has been relayed for {1}", envelopeId, address); break; case "expanded": Console.WriteLine ("Delivery of message {0} has been delivered to {1} and relayed to the the expanded recipients", envelopeId, address); break; } } } }