MapiMessage
Contents
[
Hide
]MapiMessage class
Inherits: Aspose::Email::Mapi::MapiMessageItemBase
Represents an Outlook Message format document that can be parsed.
Instances of the MapiMessage class are used to represent Microsoft Outlook Message document files that are parsed by MapiMessageReader class. To access the sender, recipient, and contents of an e-mail message, use the associated properties of the MapiMessage class.
The following exmaple demonstrates how to read Outlook Message files.
//Open Outlook Message files
MapiMessage msg = MapiMessage.Load(@"c:\outlookmessage.msg");
//read subject
Console.WriteLine("Subject:" + msg.Subject);
//sender name
Console.WriteLine("From:" + msg.SenderName);
//message body
Console.WriteLine("Body:" + msg.Body);
//Attachments
foreach(MapiAttachment att in msg.Attachments)
{
Console.WriteLine("Attachment Name:"+att.FileName);
att.Save(att.FileName);
}
'Open Outlook Message files
Dim msg As MapiMessage = MapiMessage.Load("c:\outlookmessage.msg")
'read subject
Console.WriteLine("Subject:" + msg.Subject)
'sender name
Console.WriteLine("From:" + msg.SenderName)
'message body
Console.WriteLine("Body:" + msg.Body)
'Attachments
For Each att As MapiAttachment In msg.Attachments
Console.WriteLine("Attachment Name:" + att.FileName)
att.Save(att.FileName)
Next
Constructors
| Name | Description |
|---|---|
| MapiMessage (7 overloads) | Initializes a new instance of the MapiMessage class. |
Methods
| Name | Description |
|---|---|
| AddCustomProperty (2 overloads) | Adds the custom property. |
| AddEmbeddedImageToRtfBody | Adds string data that represents embedded image into rtf body. |
| ChangeMessageClass | Changes the message type to the specified value. |
| CheckBounced | Checks whether this message can be treated as a bounce message. |
| Clone | Creates a new object that is a copy of the current instance. |
| ConvertToMapiMessage | Convert item to MapiMessage . Set MessageClass, Subject, Mileage and Billing. |
| ConvertToUnicode | Converts ASCII message to unicode. |
| CovertToUnicode | |
| DestroyAttachments | Destroies the attachments in the specified Outlook Message files. DestroyAttachments will ignore the attachment parsing. |
| FromMailMessage (4 overloads) | Creates an instance of MapiMessage from the MailMessage . |
| FromObjectData | Creates the MapiMessage from the object data. |
| FromProperties (2 overloads) | Creates an instance of MapiMessage from a collection of Mapi properties. |
| FromStreamInternal | |
| get_ClientSubmitTime | Gets the date and time the message sender submitted a message. |
| get_ConversationTopic | Gets the topic of the first message in a conversation thread. |
| get_DeliveryTime | Gets the date and time a message was delivered. |
| get_DisplayBcc | Gets a list of the display names of any blind carbon copy (BCC) message recipients, separated by semicolons (;). |
| get_DisplayCc | Gets a list of the display names of any carbon copy (CC) message recipients, separated by semicolons (;). |
| get_DisplayName | Gets the display name for the message. |
| get_DisplayNamePrefix | Gets a prefix of the display name. |
| get_DisplayTo | Gets a list of the display names of the primary (To) message recipients, separated by semicolons (;). |
| get_Flags | Gets the message flags. |
| get_Headers | Gets the transport message headers |
| get_InternetMessageId | Gets the message id of the message. |
| get_IsEncrypted | Gets a value indicating whether the message is encrypted. |
| get_IsSigned | Gets a value indicating whether the message is signed. |
| get_IsTemplate | Determines whether the message is Outlook template (.oft). |
| get_MessageFormat | Gets the outlook message format. |
| get_NormalizedSubject | Gets normalized subject of the message. |
| get_ReadReceiptRequested | Gets a value indicating whether the read receipt is requested. |
| get_ReplyTo | Gets the reply to names. |
| get_SenderAddressType | Gets the message sender’s e-mail address type. |
| get_SenderEmailAddress | Gets the message sender’s e-mail address. |
| get_SenderName | Gets the message sender’s display name. |
| get_SenderSmtpAddress | Gets the message sender’s e-mail address. |
| get_SentRepresentingAddressType | Gets the address type for the messaging user represented by the sender. |
| get_SentRepresentingEmailAddress | Gets the e-mail address for the messaging user represented by the sender. |
| get_SentRepresentingName | Gets the display name for the messaging user represented by the sender. |
| get_SentRepresentingSmtpAddress | Gets the e-mail address for the messaging user represented by the sender. |
| get_TransportMessageHeaders | Gets the transport-specific message envelope information. |
| GetAddressType | |
| GetBlankMapiMessage | |
| GetCustomProperties | Gets collection of custom MapiProperties. |
| GetSize | Gets the total size of message property values. |
| ImportCalendarToMapiMessage (2 overloads) | Imports the iCalendar to MapiMessage . |
| IsMsgFormat (2 overloads) | Determines whether the specified stream has a MSG format. |
| Load (4 overloads) | Loads message from stream. |
| LoadFromTnef (2 overloads) | Loads message from Transport Neutral Encapsulation Format (TNEF) data structure |
| LoadInternal | Loads message from stream with additional options. NOTE!!! Call this method if you don’t need to increase customer consumption credit for Dynabic.Metered. |
| MakeTemplate | |
| OnConversionProgress | |
| RemoveAttachments | Removes all of the attachments from the specified Outlook Message files. |
| Save (4 overloads) | Saves to the specified stream as Msg . |
| SaveAsTemplate (2 overloads) | Saves to the specified stream as Outlook File Template(OFT format). |
| SaveAsTnef (2 overloads) | Save message in TNEF format. |
| set_ClientSubmitTime | Sets the date and time the message sender submitted a message. |
| set_DeliveryTime | Sets the date and time a message was delivered. |
| set_Headers | Gets the transport message headers |
| set_ReadReceiptRequested | Sets a value indicating whether the read receipt is requested. |
| set_ReplyTo | Sets the reply to names. |
| set_SenderEmailAddress | Sets the message sender’s e-mail address. |
| set_SenderName | Sets the message sender’s display name. |
| set_SenderSmtpAddress | Sets the message sender’s e-mail address. |
| set_SentRepresentingEmailAddress | Sets the e-mail address for the messaging user represented by the sender. |
| set_SentRepresentingName | Sets the display name for the messaging user represented by the sender. |
| SetDateInHeaders | |
| SetProperty (3 overloads) | Sets the attachment. |
| SetStringPropertyValue | Sets the string property value. |
| ToMailMessage | Creates an instance of MailMessage from this MapiMessage . |
| ToMapiMessageItem | Convert MapiMessage to IMapiMessageItem object in dependence with MessageClass. |
| TrySetCodePageFromRtfBody | Tries the set code page from RTF body. |
| ConversionProgressEvent | Event to notify user about progress of conversion/saving. |
| emlBoundaries |