Represents an Outlook Message format document that can be parsed. More...

Inherits Aspose::Email::Mapi::MapiMessageItemBase.

Public Member Functions

bool get_IsSigned ()
 Gets a value indicating whether the message is signed. More...
 
bool get_IsEncrypted ()
 Gets a value indicating whether the message is encrypted. More...
 
System::String get_Body () override
 Gets the message text. More...
 
void set_Body (System::String value) override
 Gets the message text. More...
 
System::String get_ReplyTo ()
 Gets the reply to names. More...
 
void set_ReplyTo (System::String value)
 Sets the reply to names. More...
 
System::String get_NormalizedSubject ()
 Gets normalized subject of the message. More...
 
System::String get_DisplayTo ()
 Gets a list of the display names of the primary (To) message recipients, separated by semicolons (;). More...
 
System::String get_DisplayNamePrefix ()
 Gets a prefix of the display name. More...
 
System::String get_DisplayName ()
 Gets the display name for the message. More...
 
System::String get_DisplayCc ()
 Gets a list of the display names of any carbon copy (CC) message recipients, separated by semicolons (;). More...
 
System::String get_DisplayBcc ()
 Gets a list of the display names of any blind carbon copy (BCC) message recipients, separated by semicolons (;). More...
 
System::String get_SenderEmailAddress ()
 Gets the message sender's e-mail address. More...
 
void set_SenderEmailAddress (System::String value)
 Sets the message sender's e-mail address. More...
 
System::String get_SenderSmtpAddress ()
 Gets the message sender's e-mail address. More...
 
void set_SenderSmtpAddress (System::String value)
 Sets the message sender's e-mail address. More...
 
System::String get_SenderAddressType ()
 Gets the message sender's e-mail address type. More...
 
System::String get_SenderName ()
 Gets the message sender's display name. More...
 
void set_SenderName (System::String value)
 Sets the message sender's display name. More...
 
System::String get_TransportMessageHeaders ()
 Gets the transport-specific message envelope information. More...
 
System::String get_InternetMessageId ()
 Gets the message id of the message. More...
 
System::String get_ConversationTopic ()
 Gets the topic of the first message in a conversation thread. More...
 
System::String get_SentRepresentingEmailAddress ()
 Gets the e-mail address for the messaging user represented by the sender. More...
 
void set_SentRepresentingEmailAddress (System::String value)
 Sets the e-mail address for the messaging user represented by the sender. More...
 
System::String get_SentRepresentingSmtpAddress ()
 Gets the e-mail address for the messaging user represented by the sender. More...
 
System::String get_SentRepresentingAddressType ()
 Gets the address type for the messaging user represented by the sender. More...
 
System::String get_SentRepresentingName ()
 Gets the display name for the messaging user represented by the sender. More...
 
void set_SentRepresentingName (System::String value)
 Sets the display name for the messaging user represented by the sender. More...
 
System::DateTime get_ClientSubmitTime ()
 Gets the date and time the message sender submitted a message. More...
 
void set_ClientSubmitTime (System::DateTime value)
 Sets the date and time the message sender submitted a message. More...
 
System::DateTime get_DeliveryTime ()
 Gets the date and time a message was delivered. More...
 
void set_DeliveryTime (System::DateTime value)
 Sets the date and time a message was delivered. More...
 
System::SharedPtr< Mime::HeaderCollectionget_Headers ()
 Gets the transport message headers More...
 
void set_Headers (System::SharedPtr< Mime::HeaderCollection > value)
 Gets the transport message headers More...
 
MapiMessageFlags get_Flags ()
 Gets the message flags. More...
 
bool get_ReadReceiptRequested ()
 Gets a value indicating whether the read receipt is requested. More...
 
void set_ReadReceiptRequested (bool value)
 Sets a value indicating whether the read receipt is requested. More...
 
OutlookMessageFormat get_MessageFormat ()
 Gets the outlook message format. More...
 
bool get_IsTemplate () const
 Determines whether the message is Outlook template (.oft). More...
 
 MapiMessage ()
 Initializes a new instance of the MapiMessage class. More...
 
 MapiMessage (bool increaseCredit)
 Initializes a new instance of the MapiMessage class. More...
 
 MapiMessage (OutlookMessageFormat format)
 Initializes a new instance of the MapiMessage class. More...
 
 MapiMessage (System::String from, System::String to, System::String subject, System::String body, OutlookMessageFormat format, bool checkAddressFields)
 Initializes a new instance of the MapiMessage class. More...
 
 MapiMessage (System::String from, System::String to, System::String subject, System::String body, OutlookMessageFormat format, bool checkAddressFields, int32_t cp)
 
 MapiMessage (System::String from, System::String to, System::String subject, System::String body, OutlookMessageFormat format)
 Initializes a new instance of the MapiMessage class. More...
 
 MapiMessage (System::String from, System::String to, System::String subject, System::String body)
 Initializes a new instance of the MapiMessage class. More...
 
bool SetDateInHeaders (System::DateTime submitdate)
 
void SetStringPropertyValue (int64_t tag, System::String value)
 Sets the string property value. More...
 
void AddCustomProperty (System::SharedPtr< MapiProperty > property, System::String stringNameId)
 Adds the custom property. More...
 
void AddCustomProperty (MapiPropertyType type, System::ArrayPtr< uint8_t > data, System::String stringNameId)
 Adds the custom property. More...
 
System::SharedPtr< MapiPropertyCollectionGetCustomProperties ()
 Gets collection of custom MapiProperties. More...
 
System::SharedPtr< IMapiMessageItemToMapiMessageItem ()
 Convert MapiMessage to IMapiMessageItem object in dependence with MessageClass. More...
 
System::SharedPtr< MailMessageToMailMessage (System::SharedPtr< MailConversionOptions > options)
 Creates an instance of MailMessage from this MapiMessage. More...
 
void Save (System::String fileName, System::SharedPtr< SaveOptions > options)
 Saves message as a file with additional options. More...
 
void Save (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< SaveOptions > options)
 Saves message as a stream with additional options. More...
 
void SaveAsTnef (System::SharedPtr< System::IO::Stream > stream)
 Save message in TNEF format. More...
 
void SaveAsTnef (System::String fileName)
 Save message in TNEF format. More...
 
void Save (System::String fileName)
 Saves to the specified file as Msg. More...
 
void SaveAsTemplate (System::String fileName)
 Saves to the specified file as Outlook File Template(OFT format). More...
 
void Save (System::SharedPtr< System::IO::Stream > stream)
 Saves to the specified stream as Msg. More...
 
void SaveAsTemplate (System::SharedPtr< System::IO::Stream > stream)
 Saves to the specified stream as Outlook File Template(OFT format). More...
 
System::SharedPtr< Bounce::BounceResultCheckBounced ()
 Checks whether this message can be treated as a bounce message. More...
 
System::SharedPtr< MapiMessageClone ()
 Creates a new object that is a copy of the current instance. More...
 
System::SharedPtr< MapiMessageConvertToUnicode ()
 Converts ASCII message to unicode. More...
 
System::SharedPtr< MapiMessageConvertToMapiMessage () override
 Convert item to MapiMessage. Set MessageClass, Subject, Mileage and Billing. More...
 
void SetProperty (System::SharedPtr< PropertyDescriptor > pd, System::SharedPtr< System::Object > value) override
 Sets MAPI property. More...
 
void SetProperty (System::SharedPtr< MapiAttachment > value, int64_t signed_, int64_t key)
 Sets the attachment. More...
 
void SetProperty (System::SharedPtr< MapiRecipient > value, int64_t signed_, int64_t key)
 Sets the recipient. More...
 
void TrySetCodePageFromRtfBody ()
 Tries the set code page from RTF body. More...
 
void ChangeMessageClass (System::String messageClass)
 Changes the message type to the specified value. More...
 
System::String AddEmbeddedImageToRtfBody (System::String bodyRtf, System::SharedPtr< LinkedResource > linkedResource)
 Adds string data that represents embedded image into rtf body. More...
 
void OnConversionProgress (System::SharedPtr< ProgressEventHandlerInfo > info)
 
int32_t GetSize ()
 Gets the total size of message property values. More...
 
- Public Member Functions inherited from Aspose::Email::Mapi::MapiMessageItemBase
virtual System::String get_ItemId ()
 The item id, uses with a server More...
 
virtual void set_ItemId (System::String value)
 The item id, uses with a server More...
 
System::SharedPtr< MapiAttachmentCollectionget_Attachments ()
 Gets the attachments in the message. More...
 
void set_Attachments (System::SharedPtr< MapiAttachmentCollection > value)
 Gets the attachments in the message. More...
 
System::SharedPtr< MapiPropertyStreamget_PropertyStream ()
 Gets the property stream. More...
 
System::SharedPtr< MapiPropertyCollectionget_NamedProperties ()
 Gets the named properties of message. More...
 
System::SharedPtr< MapiRecipientCollectionget_Recipients ()
 Gets the recipients of the message. More...
 
void set_Recipients (System::SharedPtr< MapiRecipientCollection > value)
 Gets the recipients of the message. More...
 
System::SharedPtr< MapiPropertyCollectionget_SubStorages ()
 Gets the sub storages. More...
 
System::SharedPtr< MapiNamedPropertyMappingStorageget_NamedPropertyMapping ()
 Gets the named property mapping. More...
 
System::String get_SubjectPrefix ()
 Gets a subject prefix that typically indicates some action on a message, such as "FW: " for forwarding. More...
 
BodyContentType get_BodyType ()
 Gets the type of the body. More...
 
System::String get_BodyRtf ()
 Gets the RTF formatted message text. More...
 
void set_BodyRtf (System::String value)
 Sets the RTF formatted message text. More...
 
System::String get_BodyHtml ()
 Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string. More...
 
System::ArrayPtr< System::String > get_Companies ()
 Contains the names of the companies that are associated with an item. More...
 
void set_Companies (System::ArrayPtr< System::String > value)
 Contains the names of the companies that are associated with an item. More...
 
System::ArrayPtr< System::String > get_Categories ()
 Contains keywords or categories for the message object. More...
 
void set_Categories (System::ArrayPtr< System::String > value)
 Contains keywords or categories for the message object. More...
 
System::String get_Mileage ()
 Contains the mileage information that is associated with an item. More...
 
void set_Mileage (System::String value)
 Contains the mileage information that is associated with an item. More...
 
System::String get_Billing ()
 Contains the billing information associated with an item. More...
 
void set_Billing (System::String value)
 Contains the billing information associated with an item. More...
 
Aspose::Email::Storage::Pst::MapiSensitivity get_Sensitivity ()
 Gets the Sensitivity. More...
 
void set_Sensitivity (Aspose::Email::Storage::Pst::MapiSensitivity value)
 Gets the Sensitivity. More...
 
System::String get_MessageClass () override
 Gets a case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message. More...
 
void set_MessageClass (System::String value)
 Gets a case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message. More...
 
MapiItemType get_SupportedType () override
 Gets the supported item type. More...
 
System::String get_Body () override
 Gets the message text. More...
 
void set_Body (System::String value) override
 Gets the message text. More...
 
System::String get_Subject () override
 Gets the subject of the message. More...
 
void set_Subject (System::String value) override
 Sets the subject of the message. More...
 
System::SharedPtr< System::Object > get_VentureLicenseObj () const
 This stores the venture licensing state instead of 2 obvious fields such as string value for watermark and some value indicating license is set or not. More...
 
System::SharedPtr< MapiPropertyGetProperty (System::SharedPtr< PropertyDescriptor > pd) override
 Gets MAPI property by property descriptor. More...
 
bool TryGetNamedProperty (System::SharedPtr< MapiProperty > mapiProperty, System::SharedPtr< MapiNamedProperty > &mapiNamedProperty) override
 If MapiNamedPropertyMappingStorage is available, initializes and returns MapiNamedProperty, otherwise null. More...
 
void SetProperty (System::SharedPtr< PropertyDescriptor > pd, System::SharedPtr< System::Object > value) override
 Sets MAPI property. More...
 
void SetStringNamedProperty (System::String value, MapiNamedPropertyId nameId, System::Guid psetId)
 
void SetsIMapiMessageItemMembers (System::String messageClass, System::String body, System::String subject)
 Sets MessageClass,Body and Subject. More...
 
void Dispose () override
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
void SetNamedPropertyMapping (System::SharedPtr< MapiNamedPropertyMappingStorage > value)
 Sets the named property mapping. More...
 
int64_t GetTagFromNamedProperty (MapiNamedPropertyId propertyId)
 Gets the tag from named property. More...
 
int64_t GetTagFromNamedProperty (System::String name)
 Gets the tag from named property. More...
 
void AddNamedProperty (MapiPropertyType type, System::ArrayPtr< uint8_t > data, int64_t nameId, System::Guid guid)
 Adds the named property. More...
 
void AddNamedProperty (System::SharedPtr< MapiAttachment > attachment, MapiPropertyType type, System::ArrayPtr< uint8_t > data, int64_t nameId, System::Guid guid)
 Adds the named property. More...
 
void AddNamedProperty (MapiPropertyType type, System::ArrayPtr< uint8_t > data, int64_t nameId, System::Guid guid, System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< System::Object >>> mvEntries)
 Adds the named property. More...
 
void AddNamedProperty (MapiPropertyType type, System::ArrayPtr< uint8_t > data, System::String nameId, System::Guid guid)
 Adds the named property. More...
 
void AddNamedProperty (System::SharedPtr< MapiAttachment > attachment, MapiPropertyType type, System::ArrayPtr< uint8_t > data, System::String nameId, System::Guid guid)
 Adds the named property. More...
 
void AddNamedProperty (MapiPropertyType type, System::ArrayPtr< uint8_t > data, System::String nameId, System::Guid guid, System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< System::Object >>> mvEntries)
 Adds the named property. More...
 
int64_t AddNamedPropertyToEmbeddedMsg (System::SharedPtr< MapiMessage > msg, MapiPropertyType type, System::ArrayPtr< uint8_t > data, System::SharedPtr< System::Object > nameId, System::Guid guid)
 Adds the named property to embedded message. More...
 
void SetBodyRtf (System::String content, bool compression)
 Gets or sets the RTF formatted message text. More...
 
virtual void SetBodyContent (System::String content, BodyContentType contentType)
 Sets the content of the body. More...
 
virtual void SetBodyContent (System::String content, BodyContentType contentType, bool compression)
 Sets the content of the body. More...
 
void SetMessageFlags (MapiMessageFlags flags)
 Sets the message flags. More...
 
void RemoveProperty (int64_t tag)
 Provides correctly removing property from all collections. More...
 
void SetVentureLicense (System::SharedPtr< System::Object > ventureLicense)
 All Aspose products should implement this method. It is called by a GroupDocs product to indicate whether GroupDocs itself is licensed or not and specify a custom watermark. When GroupDocs is licensed, this document instance should behave as licensed too even if the Aspose product is not licensed. More...
 
void UpdateHasAttach ()
 Updates the PR_HASATTACH property value. More...
 
MapiMessageFlags GetFlags ()
 
void UpdateDisplayNames (MapiRecipientType recipientType)
 Updates the display names. More...
 
void AddNamedProperty (System::DateTime value, int64_t nameId, System::Guid guid)
 Adds the named datetime property. More...
 
void AddNamedProperty (System::DateTime value, MapiNamedPropertyId nameId, System::Guid guid)
 Adds the named datetime property. More...
 
void AddNamedProperty (bool value, MapiNamedPropertyId nameId, System::Guid guid)
 Adds the named bool property. More...
 
void AddNamedProperty (bool value, int64_t nameId, System::Guid guid)
 Adds the named bool property. More...
 
void AddNamedPropertyLong (int64_t value, MapiNamedPropertyId nameId, System::Guid guid)
 Adds the named long property. More...
 
void AddNamedPropertyLong (int64_t value, int64_t nameId, System::Guid guid)
 Adds the named long property. More...
 
void AddNamedProperty (System::String value, OutlookMessageFormat format, MapiNamedPropertyId nameId, System::Guid guid)
 Adds the named string property. More...
 
void AddNamedProperty (System::String value, MapiNamedPropertyId nameId, System::Guid guid)
 Adds the named string property. More...
 
void AddNamedProperty (System::String value, OutlookMessageFormat format, int64_t nameId, System::Guid guid)
 Adds the named string property. More...
 
void AddNamedProperty (System::ArrayPtr< uint8_t > value, int64_t nameId, System::Guid guid)
 Adds the named binary property. More...
 
void AddNamedProperty (System::ArrayPtr< uint8_t > value, MapiNamedPropertyId nameId, System::Guid guid)
 Adds the named binary property. More...
 
- Public Member Functions inherited from Aspose::Email::Mapi::MapiPropertyContainer
virtual System::SharedPtr< MapiPropertyCollectionget_Properties ()
 Gets the collection of properties. More...
 
virtual int32_t get_CodePage ()
 Gets the code page. More...
 
System::SharedPtr< System::Text::Encoding > get_CurrentEncoding ()
 
 MapiPropertyContainer ()
 Initializes a new instance of the MapiPropertyContainer class. More...
 
 MapiPropertyContainer (System::SharedPtr< MapiPropertyCollection > properties)
 Initializes a new instance of the MapiPropertyContainer class. More...
 
System::SharedPtr< MapiPropertyCollectionGetSubStorages ()
 
System::String TryGetPropertyString (int64_t tag, int32_t codepage)
 Try to get a property data as string with specified tag and code page. More...
 
System::ArrayPtr< uint8_t > TryGetPropertyData (int64_t tag)
 Try to get the property data with specified tag key. More...
 
System::String TryGetPropertyString (int64_t tag)
 Try to get a property data as string with specified tag. More...
 
System::String GetPropertyString (int64_t tag, int32_t codepage)
 Gets the string value of the property specified by tag. More...
 
System::String GetPropertyString (int64_t tag)
 Gets the string value of the property specified by tag. More...
 
System::ArrayPtr< uint8_t > GetPropertyBytes (int64_t tag)
 Gets the string value of the property specified by tag. More...
 
virtual void SetProperty (System::SharedPtr< MapiProperty > value)
 Sets the property. More...
 
System::Nullable< int32_t > GetPropertyInt32 (int64_t tag)
 Gets the int32 value of the property specified by tag. More...
 
System::Nullable< int64_t > GetPropertyLong (int64_t tag)
 Gets the value of the property specified by tag as Long (int64) type. More...
 
System::Nullable< int16_t > GetPropertyShort (int64_t tag)
 Gets the value of the property specified by tag as Short type. More...
 
System::Nullable< bool > GetPropertyBoolean (int64_t tag)
 Gets the value of the property specified by tag as Boolean type. More...
 
System::Nullable< System::DateTime > GetPropertyDateTime (int64_t key)
 Gets the value of the property specified by tag as DateTime type. More...
 
bool IsStoreUnicodeOk ()
 Determines if string properties are Unicode encoded or not. More...
 
bool TryGetPropertyString (int64_t tag, System::String &value, int32_t codepage)
 Gets the value of the specified property as String type. A return value indicates whether the operation succeeded. More...
 
bool TryGetPropertyString (int64_t tag, System::String &value)
 Gets the value of the specified property as String type. A return value indicates whether the operation succeeded. More...
 
bool TryGetPropertyDateTime (int64_t tag, System::DateTime &value)
 Gets the value of the specified property as DateTime type. A return value indicates whether the operation succeeded. More...
 
bool TryGetPropertyLong (int64_t tag, int64_t &value)
 Gets the value of the specified property as Long type. A return value indicates whether the operation succeeded. More...
 
bool TryGetPropertyInt32 (int64_t tag, int32_t &value)
 Gets the value of the specified property as Int32 type. A return value indicates whether the operation succeeded. More...
 
virtual System::SharedPtr< Nodes::IMapiNode > CreateMapiNode (System::String key)
 Creates the mapi node. More...
 
void SetProperty (int64_t tag, System::ArrayPtr< uint8_t > data)
 Set the property. More...
 
void SetProperty (int64_t tag, System::String value, OutlookMessageFormat format)
 Set the string property. More...
 
void SetProperty (int64_t tag, System::String value, bool isUnicode)
 Set the string property. More...
 
void SetProperty (int64_t tag, System::String value, System::SharedPtr< System::Text::Encoding > nonUnicodeEncoding)
 Set the string property. More...
 
void SetProperty (int64_t tag, System::String value)
 Set the string property with CurrentEncoding More...
 
void SetProperty (int64_t tag, System::DateTime dateTime)
 Set the datetime property. More...
 
void SetPropertyLong (int64_t tag, int64_t value)
 Set the long property. More...
 

Static Public Member Functions

static System::SharedPtr< MapiMessageGetBlankMapiMessage (System::SharedPtr< VentureLicense > ventureLicense)
 
static System::String GetAddressType (System::String address)
 
static System::SharedPtr< MapiMessageLoad (System::String fileName)
 Loads message from file. More...
 
static System::SharedPtr< MapiMessageLoad (System::SharedPtr< System::IO::Stream > stream)
 Loads message from stream. More...
 
static System::SharedPtr< MapiMessageLoad (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< LoadOptions > options)
 Loads message from stream with additional options. More...
 
static System::SharedPtr< MapiMessageLoadInternal (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< LoadOptions > options)
 Loads message from stream with additional options. NOTE!!! Call this method if you don't need to increase customer consumption credit for Dynabic.Metered. More...
 
static System::SharedPtr< MapiMessageLoad (System::String fileName, System::SharedPtr< LoadOptions > options)
 Loads message from file with additional options. More...
 
static System::SharedPtr< MapiMessageFromStreamInternal (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< VentureLicense > ventureLicense)
 
static System::SharedPtr< MapiMessageFromProperties (System::SharedPtr< MapiPropertyCollection > properties)
 Creates an instance of MapiMessage from a collection of Mapi properties. More...
 
static System::SharedPtr< MapiMessageFromMailMessage (System::String fileName)
 Creates an instance of MapiMessage from the MailMessage. More...
 
static System::SharedPtr< MapiMessageFromMailMessage (System::SharedPtr< System::IO::Stream > stream)
 Creates an instance of MapiMessage from the EML format data stream. More...
 
static System::SharedPtr< MapiMessageFromMailMessage (System::SharedPtr< MailMessage > message)
 Creates an instance of MapiMessage from the MailMessage. More...
 
static System::SharedPtr< MapiMessageFromMailMessage (System::SharedPtr< MailMessage > message, System::SharedPtr< MapiConversionOptions > options)
 Creates an instance of MapiMessage from the MailMessage. More...
 
static System::SharedPtr< MapiAttachmentCollectionRemoveAttachments (System::String path)
 Removes all of the attachments from the specified Outlook Message files. More...
 
static void DestroyAttachments (System::String path)
 Destroies the attachments in the specified Outlook Message files. DestroyAttachments will ignore the attachment parsing. More...
 
static void MakeTemplate (System::String fileName, bool unicode)
 
static void CovertToUnicode (System::String fileName)
 
static System::SharedPtr< MapiMessageLoadFromTnef (System::SharedPtr< System::IO::Stream > stream)
 Loads message from Transport Neutral Encapsulation Format (TNEF) data structure More...
 
static System::SharedPtr< MapiMessageLoadFromTnef (System::String fileName)
 Loads message from Transport Neutral Encapsulation Format (TNEF) data structure More...
 
static bool IsMsgFormat (System::String fileName)
 Determines whether the specified file has a MSG format. More...
 
static bool IsMsgFormat (System::SharedPtr< System::IO::Stream > stream)
 Determines whether the specified stream has a MSG format. More...
 
static System::SharedPtr< MapiMessageFromProperties (System::SharedPtr< MapiPropertyCollection > properties, bool removeNamedProperties)
 Creates an instance of MapiMessage from a collection of Mapi properties. More...
 
static System::SharedPtr< MapiMessageFromObjectData (System::SharedPtr< MapiObjectProperty > objectData, System::SharedPtr< System::Object > ventureLicense)
 Creates the MapiMessage from the object data. More...
 
static System::SharedPtr< MapiMessageImportCalendarToMapiMessage (System::SharedPtr< Calendar::Model::CalendarObject > calendarObject, OutlookMessageFormat format, System::String from)
 Imports the iCalendar to MapiMessage. More...
 
static System::SharedPtr< MapiMessageImportCalendarToMapiMessage (System::SharedPtr< Calendar::Model::CalendarObject > calendarObject, OutlookMessageFormat format, System::String from, int32_t cp)
 
- Static Public Member Functions inherited from Aspose::Email::Mapi::MapiMessageItemBase
static void SetPriority (System::SharedPtr< MapiMessageItemBase > message, MailPriority priority)
 Sets MailPriority value for MapiMessageItemBase See more PidTagPriority mapi property: https://msdn.microsoft.com/en-us/library/ee159473(v=exchg.80).aspx See more PidTagImportance mapi property: https://msdn.microsoft.com/en-us/library/ee237166(v=exchg.80).aspx More...
 
static int64_t GetTagFromNamedProperty (MapiNamedPropertyId propertyId, System::SharedPtr< MapiPropertyCollection > namedProperties)
 
static int64_t GetTagFromNamedProperty (System::String name, System::SharedPtr< MapiPropertyCollection > namedProperties)
 

Public Attributes

System::SharedPtr< System::Collections::Generic::ListExt< System::String > > emlBoundaries
 
System::Event< void(System::SharedPtr< ProgressEventHandlerInfo >)> ConversionProgressEvent
 Event to notify user about progress of conversion/saving. More...
 
- Public Attributes inherited from Aspose::Email::Mapi::MapiMessageItemBase
System::SharedPtr< MapiNamedPropertyMappingStoragenamedPropertyMappingStorage
 The named property mapping storage. More...
 
- Public Attributes inherited from Aspose::Email::Mapi::MapiPropertyContainer
int32_t codePage
 The code page. More...
 
System::SharedPtr< MapiPropertyCollectionpropertyDictionary
 The property dictionary. More...
 

Protected Member Functions

virtual ~MapiMessage ()
 
- Protected Member Functions inherited from Aspose::Email::Mapi::MapiMessageItemBase
 MapiMessageItemBase ()
 Initializes a new instance of the MapiMessageItemBase class. More...
 
 MapiMessageItemBase (System::SharedPtr< MapiPropertyCollection > properties)
 Initializes a new instance of the MapiMessageItemBase class. More...
 
void CheckIsDisposed ()
 Checks if the object is disposed and raised exception in this case. More...
 
void InitNamedPropertyMappingStorage ()
 Inits the named property mapping storage. More...
 
System::SharedPtr< MapiNamedPropertyCreateNamedProperty (MapiPropertyType type, System::ArrayPtr< uint8_t > data, System::String nameId, System::Guid guid)
 
virtual ~MapiMessageItemBase ()
 
- Protected Member Functions inherited from Aspose::Email::Mapi::MapiPropertyContainer
virtual ~MapiPropertyContainer ()
 

Friends

class Aspose::Email::MailMessage
 
class Aspose::Email::Clients::Exchange::WebService::CalendarEwsConverter
 
class Aspose::Email::Tools::CalendarConverter
 
class Aspose::Email::Clients::Exchange::WebService::EwsConverterUtils
 
class Aspose::Email::Clients::Exchange::Dav::ExchangeClient
 
class Aspose::Email::Mapi::MailMessageInterpretor
 
class Aspose::Email::Mapi::TaskMailMessageInterpretor
 
class Aspose::Email::Mapi::MapiAttachment
 
class Aspose::Email::Mapi::MapiMessageItemBase
 
class Aspose::Email::Mapi::MapiContactElectronicAddress
 
class Aspose::Email::Mapi::MapiMessageReader
 
class Aspose::Email::Mapi::Nodes::AttachmentDirectory
 
class Aspose::Email::Mapi::Nodes::RecipientDirectory
 
class Aspose::Email::Storage::Pst::FolderInfo
 
class Aspose::Email::Storage::Pst::Ltp::LtpDoer
 
class Aspose::Email::Storage::Pst::Ltp::PropertyContext
 
class Aspose::Email::Storage::Pst::PstDoer
 
class Aspose::Email::Storage::Pst::PstUtil
 
class Aspose::Email::Tnef::TnefAttachment
 
class Aspose::Email::Tnef::TnefMessageProperty
 
class Aspose::Email::Tools::ForwardMessageBuilder
 
class Aspose::Email::Tools::ReplyMessageBuilder
 

Additional Inherited Members

- Static Public Attributes inherited from Aspose::Email::Mapi::MapiPropertyContainer
static const int32_t DefaultCodePage
 
- Protected Attributes inherited from Aspose::Email::Mapi::MapiMessageItemBase
System::SharedPtr< MapiAttachmentCollectionattachments
 The collection of attachments. More...
 
System::SharedPtr< MapiRecipientCollectionrecipients
 The collection of recipients. More...
 

Detailed Description

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.

[C#]

//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);
}
<br>

[Visual Basic]

'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

Constructor & Destructor Documentation

◆ MapiMessage() [1/7]

Aspose::Email::Mapi::MapiMessage::MapiMessage ( )

Initializes a new instance of the MapiMessage class.

◆ MapiMessage() [2/7]

Aspose::Email::Mapi::MapiMessage::MapiMessage ( bool  increaseCredit)

Initializes a new instance of the MapiMessage class.

Parameters
increaseCreditif set to true [increase credit].

◆ MapiMessage() [3/7]

Aspose::Email::Mapi::MapiMessage::MapiMessage ( OutlookMessageFormat  format)

Initializes a new instance of the MapiMessage class.

Parameters
formatDefines whether to use Unicode or ASCII encoding for this message.

◆ MapiMessage() [4/7]

Aspose::Email::Mapi::MapiMessage::MapiMessage ( System::String  from,
System::String  to,
System::String  subject,
System::String  body,
OutlookMessageFormat  format,
bool  checkAddressFields 
)

Initializes a new instance of the MapiMessage class.

Parameters
fromFrom.
toTo.
subjectThe subject.
bodyThe body.
formatThe format.
checkAddressFieldsif set to true [check address fields].

◆ MapiMessage() [5/7]

Aspose::Email::Mapi::MapiMessage::MapiMessage ( System::String  from,
System::String  to,
System::String  subject,
System::String  body,
OutlookMessageFormat  format,
bool  checkAddressFields,
int32_t  cp 
)

◆ MapiMessage() [6/7]

Aspose::Email::Mapi::MapiMessage::MapiMessage ( System::String  from,
System::String  to,
System::String  subject,
System::String  body,
OutlookMessageFormat  format 
)

Initializes a new instance of the MapiMessage class.

Parameters
fromThe From address.
toThe addresses of recipients. Note, that addresses are separated by semicolon.
subjectThe message subject.
bodyThe message body.
formatDefines whether to use Unicode or ASCII encoding for this message.
Exceptions
ArgumentNullExceptionIs being thrown if address of recipient is null or empty.
ArgumentExceptionIs being thrown if sender or recipient address is not in a recognized format.
InvalidEnumArgumentExceptionIs being thrown if format parameter is not a valid enumeration member.

◆ MapiMessage() [7/7]

Aspose::Email::Mapi::MapiMessage::MapiMessage ( System::String  from,
System::String  to,
System::String  subject,
System::String  body 
)

Initializes a new instance of the MapiMessage class.

Parameters
fromThe From address.
toThe addresses of recipients. Note, that addresses are separated by semicolon.
subjectThe message subject.
bodyThe message body.
Exceptions
ArgumentNullExceptionthrows if address of recipient is null or empty.
ArgumentExceptionthrows if sender or recipient address is not in a recognized format.

◆ ~MapiMessage()

virtual Aspose::Email::Mapi::MapiMessage::~MapiMessage ( )
protectedvirtual

Member Function Documentation

◆ AddCustomProperty() [1/2]

void Aspose::Email::Mapi::MapiMessage::AddCustomProperty ( MapiPropertyType  type,
System::ArrayPtr< uint8_t >  data,
System::String  stringNameId 
)

Adds the custom property.

Parameters
typeType of MapiPropertyAspose::Email::Mapi::MapiPropertyType
dataMapiProperty data.uint8_t
stringNameIdThe name of propertySystem::String.
Exceptions
ArgumentExceptionIf property data is null.
System::NotSupportedExceptionIf data type is not supported yet.

◆ AddCustomProperty() [2/2]

void Aspose::Email::Mapi::MapiMessage::AddCustomProperty ( System::SharedPtr< MapiProperty property,
System::String  stringNameId 
)

Adds the custom property.

Parameters
propertyThe propertyMapiProperty.
stringNameIdThe name of propertySystem::String.
Exceptions
ArgumentNullExceptionIf property is null.
ArgumentExceptionIf property data is null.
System::NotSupportedExceptionIf data type is not supported yet.

◆ AddEmbeddedImageToRtfBody()

System::String Aspose::Email::Mapi::MapiMessage::AddEmbeddedImageToRtfBody ( System::String  bodyRtf,
System::SharedPtr< LinkedResource linkedResource 
)

Adds string data that represents embedded image into rtf body.

Parameters
bodyRtfRtf body of msg.
linkedResourceInline image resource.
Returns
Rtf body with embedded image.

◆ ChangeMessageClass()

void Aspose::Email::Mapi::MapiMessage::ChangeMessageClass ( System::String  messageClass)

Changes the message type to the specified value.

Parameters
messageClassThe message class.

◆ CheckBounced()

System::SharedPtr<Bounce::BounceResult> Aspose::Email::Mapi::MapiMessage::CheckBounced ( )

Checks whether this message can be treated as a bounce message.

Returns
Result of checkingBounceResult.

◆ Clone()

System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::Clone ( )

Creates a new object that is a copy of the current instance.

Returns
A new object that is a copy of this instance.

◆ ConvertToMapiMessage()

System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::ConvertToMapiMessage ( )
overridevirtual

Convert item to MapiMessage. Set MessageClass, Subject, Mileage and Billing.

Returns

Reimplemented from Aspose::Email::Mapi::MapiMessageItemBase.

◆ ConvertToUnicode()

System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::ConvertToUnicode ( )

Converts ASCII message to unicode.

Returns
The unicode MapiMessage.

◆ CovertToUnicode()

static void Aspose::Email::Mapi::MapiMessage::CovertToUnicode ( System::String  fileName)
static

◆ DestroyAttachments()

static void Aspose::Email::Mapi::MapiMessage::DestroyAttachments ( System::String  path)
static

Destroies the attachments in the specified Outlook Message files. DestroyAttachments will ignore the attachment parsing.

Parameters
pathThe name of the Outlook Message file.

The following exmaple demonstrates how to destroy attachments in Outlook Message files.

[C#]

//Destroy attachments from Outlook Message files
MapiMessage.DestroyAttachment(@"c:\outlookmessage.msg");

[Visual Basic]

'Destroy attachments from Outlook Message files
MapiMessage.DestroyAttachment("c:\outlookmessage.msg")

◆ FromMailMessage() [1/4]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::FromMailMessage ( System::SharedPtr< MailMessage message)
static

Creates an instance of MapiMessage from the MailMessage.

Parameters
messageThe MailMessage.
Returns
Returns a MapiMessage instance which is loaded from the MailMessage.

◆ FromMailMessage() [2/4]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::FromMailMessage ( System::SharedPtr< MailMessage message,
System::SharedPtr< MapiConversionOptions options 
)
static

Creates an instance of MapiMessage from the MailMessage.

Parameters
messageThe MailMessage.
optionsMapiFromMailMessageOptions MapiConversionOptions
Returns
MapiMessage that represents Outlook message.

◆ FromMailMessage() [3/4]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::FromMailMessage ( System::SharedPtr< System::IO::Stream >  stream)
static

Creates an instance of MapiMessage from the EML format data stream.

Parameters
streamThe stream of data that represents an EML file.
Returns
Returns a MapiMessage instance which is loaded from the EML format data stream.

◆ FromMailMessage() [4/4]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::FromMailMessage ( System::String  fileName)
static

Creates an instance of MapiMessage from the MailMessage.

Parameters
fileNameThe file name of MailMessage.
Returns
Returns a MapiMessage instance which is loaded from the MailMessage.

◆ FromObjectData()

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::FromObjectData ( System::SharedPtr< MapiObjectProperty objectData,
System::SharedPtr< System::Object >  ventureLicense 
)
static

Creates the MapiMessage from the object data.

Parameters
objectDataThe object data.
Returns

◆ FromProperties() [1/2]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::FromProperties ( System::SharedPtr< MapiPropertyCollection properties)
static

Creates an instance of MapiMessage from a collection of Mapi properties.

Parameters
propertiesA collection of MapiProperty.
Returns
Returns a MapiMessage instance which is loaded from the specified properties.

◆ FromProperties() [2/2]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::FromProperties ( System::SharedPtr< MapiPropertyCollection properties,
bool  removeNamedProperties 
)
static

Creates an instance of MapiMessage from a collection of Mapi properties.

Parameters
propertiesThe property collection.
removeNamedPropertiesIf set to true then named properties will be removed from collection.
Returns
Returns a MapiMessage instance which is loaded from the specified properties.

◆ FromStreamInternal()

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::FromStreamInternal ( System::SharedPtr< System::IO::Stream >  stream,
System::SharedPtr< VentureLicense >  ventureLicense 
)
static

◆ get_Body()

System::String Aspose::Email::Mapi::MapiMessage::get_Body ( )
overridevirtual

Gets the message text.

The string that represents message body.

Implements Aspose::Email::Mapi::IMapiMessageItem.

◆ get_ClientSubmitTime()

System::DateTime Aspose::Email::Mapi::MapiMessage::get_ClientSubmitTime ( )

Gets the date and time the message sender submitted a message.

If the property was not available, DateTime.MinValue is returned.

The DateTime that represents client submit time.

◆ get_ConversationTopic()

System::String Aspose::Email::Mapi::MapiMessage::get_ConversationTopic ( )

Gets the topic of the first message in a conversation thread.

The string that represens conversation topic.

◆ get_DeliveryTime()

System::DateTime Aspose::Email::Mapi::MapiMessage::get_DeliveryTime ( )

Gets the date and time a message was delivered.

If the property was not available, DateTime.MinValue is returned.

The DateTime that represents delivery time.

◆ get_DisplayBcc()

System::String Aspose::Email::Mapi::MapiMessage::get_DisplayBcc ( )

Gets a list of the display names of any blind carbon copy (BCC) message recipients, separated by semicolons (;).

The string that represents display bcc.

◆ get_DisplayCc()

System::String Aspose::Email::Mapi::MapiMessage::get_DisplayCc ( )

Gets a list of the display names of any carbon copy (CC) message recipients, separated by semicolons (;).

The string that represents display cc.

◆ get_DisplayName()

System::String Aspose::Email::Mapi::MapiMessage::get_DisplayName ( )

Gets the display name for the message.

The string that represents display name.

◆ get_DisplayNamePrefix()

System::String Aspose::Email::Mapi::MapiMessage::get_DisplayNamePrefix ( )

Gets a prefix of the display name.

The string that represents display name prefix.

◆ get_DisplayTo()

System::String Aspose::Email::Mapi::MapiMessage::get_DisplayTo ( )

Gets a list of the display names of the primary (To) message recipients, separated by semicolons (;).

The string that represents display to.

◆ get_Flags()

MapiMessageFlags Aspose::Email::Mapi::MapiMessage::get_Flags ( )

Gets the message flags.

The message flags.

◆ get_Headers()

System::SharedPtr<Mime::HeaderCollection> Aspose::Email::Mapi::MapiMessage::get_Headers ( )

Gets the transport message headers

◆ get_InternetMessageId()

System::String Aspose::Email::Mapi::MapiMessage::get_InternetMessageId ( )

Gets the message id of the message.

The string that represents internet message id.

◆ get_IsEncrypted()

bool Aspose::Email::Mapi::MapiMessage::get_IsEncrypted ( )

Gets a value indicating whether the message is encrypted.

◆ get_IsSigned()

bool Aspose::Email::Mapi::MapiMessage::get_IsSigned ( )

Gets a value indicating whether the message is signed.

◆ get_IsTemplate()

bool Aspose::Email::Mapi::MapiMessage::get_IsTemplate ( ) const

Determines whether the message is Outlook template (.oft).

Returns
true if the message is OFT template; otherwise, false.

◆ get_MessageFormat()

OutlookMessageFormat Aspose::Email::Mapi::MapiMessage::get_MessageFormat ( )

Gets the outlook message format.

The outlook message format.

◆ get_NormalizedSubject()

System::String Aspose::Email::Mapi::MapiMessage::get_NormalizedSubject ( )

Gets normalized subject of the message.

The string that represents normalized subject.

◆ get_ReadReceiptRequested()

bool Aspose::Email::Mapi::MapiMessage::get_ReadReceiptRequested ( )

Gets a value indicating whether the read receipt is requested.

true if the read receipt is requested; otherwise, false.

◆ get_ReplyTo()

System::String Aspose::Email::Mapi::MapiMessage::get_ReplyTo ( )

Gets the reply to names.

Gets the list of ReplyTo addresses separated by semicolon.

The reply to names.

Exceptions
ArgumentNullExceptionthrows if reply to address is null.
ArgumentExceptionthrows if reply to address is not in a recognized format.

◆ get_SenderAddressType()

System::String Aspose::Email::Mapi::MapiMessage::get_SenderAddressType ( )

Gets the message sender's e-mail address type.

The string that represents sender address type.

◆ get_SenderEmailAddress()

System::String Aspose::Email::Mapi::MapiMessage::get_SenderEmailAddress ( )

Gets the message sender's e-mail address.

When setting a value, the values of PR_SENDER_SEARCH_KEY and PR_SENDER_ENTRYID properties are updated as well. When setting a null value or empty string, the values of properties are set null.

The string that represents sender email address.

Exceptions
ArgumentExceptionthrows if sender address is not in a recognized format.

◆ get_SenderName()

System::String Aspose::Email::Mapi::MapiMessage::get_SenderName ( )

Gets the message sender's display name.

When setting a null value or empty string, the values of the property get the value equal to SenderEmailAddress.

The the string that represents sender name.

◆ get_SenderSmtpAddress()

System::String Aspose::Email::Mapi::MapiMessage::get_SenderSmtpAddress ( )

Gets the message sender's e-mail address.

When setting a value, the values of PR_SENDER_SEARCH_KEY and PR_SENDER_ENTRYID properties are updated as well. When setting a null value or empty string, the values of properties are set null.

The string that represents sender email address.

Exceptions
ArgumentExceptionthrows if sender address is not in a recognized format.

◆ get_SentRepresentingAddressType()

System::String Aspose::Email::Mapi::MapiMessage::get_SentRepresentingAddressType ( )

Gets the address type for the messaging user represented by the sender.

The string that represents sent representing address type.

◆ get_SentRepresentingEmailAddress()

System::String Aspose::Email::Mapi::MapiMessage::get_SentRepresentingEmailAddress ( )

Gets the e-mail address for the messaging user represented by the sender.

When setting a value, the values of PR_SENT_REPRESENTING_SEARCH_KEY and PR_SENT_REPRESENTING_ENTRYID properties are updated as well. When setting a null value or empty string, the values of the property are set null.

The string that represents sent representing email address.

Exceptions
ArgumentExceptionthrows if email address is not in a recognized format.

◆ get_SentRepresentingName()

System::String Aspose::Email::Mapi::MapiMessage::get_SentRepresentingName ( )

Gets the display name for the messaging user represented by the sender.

When setting a null value or empty string, the values of the property are set in SentRepresentingEmailAddress.

The string that represents sent representing name.

◆ get_SentRepresentingSmtpAddress()

System::String Aspose::Email::Mapi::MapiMessage::get_SentRepresentingSmtpAddress ( )

Gets the e-mail address for the messaging user represented by the sender.

The string that represents sent representing email address.

◆ get_TransportMessageHeaders()

System::String Aspose::Email::Mapi::MapiMessage::get_TransportMessageHeaders ( )

Gets the transport-specific message envelope information.

The string that represents transport message headers.

◆ GetAddressType()

static System::String Aspose::Email::Mapi::MapiMessage::GetAddressType ( System::String  address)
static

◆ GetBlankMapiMessage()

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::GetBlankMapiMessage ( System::SharedPtr< VentureLicense >  ventureLicense)
static

◆ GetCustomProperties()

System::SharedPtr<MapiPropertyCollection> Aspose::Email::Mapi::MapiMessage::GetCustomProperties ( )

Gets collection of custom MapiProperties.

Returns
Collection of custom MapiPropertiesAspose::Email::Mapi::MapiPropertyCollection.

◆ GetSize()

int32_t Aspose::Email::Mapi::MapiMessage::GetSize ( )

Gets the total size of message property values.

Returns

◆ ImportCalendarToMapiMessage() [1/2]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::ImportCalendarToMapiMessage ( System::SharedPtr< Calendar::Model::CalendarObject >  calendarObject,
OutlookMessageFormat  format,
System::String  from 
)
static

Imports the iCalendar to MapiMessage.

Parameters
calendarObjectThe calendar.
format
from
Returns
The MapiMessage that represents meeting request in outlook format.

◆ ImportCalendarToMapiMessage() [2/2]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::ImportCalendarToMapiMessage ( System::SharedPtr< Calendar::Model::CalendarObject >  calendarObject,
OutlookMessageFormat  format,
System::String  from,
int32_t  cp 
)
static

◆ IsMsgFormat() [1/2]

static bool Aspose::Email::Mapi::MapiMessage::IsMsgFormat ( System::SharedPtr< System::IO::Stream >  stream)
static

Determines whether the specified stream has a MSG format.

Parameters
streamThe message stream.
Returns
true if the stream is represented in MSG format]; otherwise, false.

◆ IsMsgFormat() [2/2]

static bool Aspose::Email::Mapi::MapiMessage::IsMsgFormat ( System::String  fileName)
static

Determines whether the specified file has a MSG format.

Parameters
fileNameName of the file.
Returns
true if the file is represented in MSG format; otherwise, false.

◆ Load() [1/4]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::Load ( System::SharedPtr< System::IO::Stream >  stream)
static

Loads message from stream.

Parameters
streamSource streamSystem::IO::Stream.
Returns
Exceptions
FormatNotSupportedExceptionPassed message format is not supported.
System::ArgumentNullExceptionStream should not be null or empty.
System::NotSupportedExceptionStream does not support reading.

◆ Load() [2/4]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::Load ( System::SharedPtr< System::IO::Stream >  stream,
System::SharedPtr< LoadOptions options 
)
static

Loads message from stream with additional options.

Parameters
streamSource streamSystem::IO::Stream.
optionsAdditional options LoadOptions.
Returns
Exceptions
FormatNotSupportedExceptionPassed message format is not supported.
System::ArgumentNullExceptionStream should not be null or empty.
System::NotSupportedExceptionStream does not support reading.

◆ Load() [3/4]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::Load ( System::String  fileName)
static

Loads message from file.

Parameters
fileNameSource file pathSystem::String.
Returns
Exceptions
System::ArgumentNullExceptionFile name should not be null or empty.
System::NotSupportedExceptionStream does not support reading.
FormatNotSupportedExceptionPassed message format is not supported.

◆ Load() [4/4]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::Load ( System::String  fileName,
System::SharedPtr< LoadOptions options 
)
static

Loads message from file with additional options.

Parameters
fileNameSource file pathSystem::String.
optionsAdditional options LoadOptions.
Returns
Exceptions
System::ArgumentNullExceptionFile name should not be null or empty.
System::NotSupportedExceptionStream does not support reading.
FormatNotSupportedExceptionPassed message format is not supported.

◆ LoadFromTnef() [1/2]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::LoadFromTnef ( System::SharedPtr< System::IO::Stream >  stream)
static

Loads message from Transport Neutral Encapsulation Format (TNEF) data structure

Parameters
streamA stream representing message data in TNEF format
Exceptions
ArgumentNullExceptionstream is null
NotSupportedExceptionstream does not support reading
Returns
A read MapiMessage

◆ LoadFromTnef() [2/2]

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::LoadFromTnef ( System::String  fileName)
static

Loads message from Transport Neutral Encapsulation Format (TNEF) data structure

Parameters
fileNameName of file containing message data in TNEF format
Exceptions
ArgumentExceptionfileName is null or empty
Returns
A read MapiMessage

◆ LoadInternal()

static System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiMessage::LoadInternal ( System::SharedPtr< System::IO::Stream >  stream,
System::SharedPtr< LoadOptions options 
)
static

Loads message from stream with additional options. NOTE!!! Call this method if you don't need to increase customer consumption credit for Dynabic.Metered.

Parameters
streamSource streamSystem::IO::Stream.
optionsAdditional options LoadOptions.
Returns
Exceptions
FormatNotSupportedExceptionPassed message format is not supported.
System::ArgumentNullExceptionStream should not be null or empty.
System::NotSupportedExceptionStream does not support reading.

◆ MakeTemplate()

static void Aspose::Email::Mapi::MapiMessage::MakeTemplate ( System::String  fileName,
bool  unicode 
)
static

◆ OnConversionProgress()

void Aspose::Email::Mapi::MapiMessage::OnConversionProgress ( System::SharedPtr< ProgressEventHandlerInfo info)

◆ RemoveAttachments()

static System::SharedPtr<MapiAttachmentCollection> Aspose::Email::Mapi::MapiMessage::RemoveAttachments ( System::String  path)
static

Removes all of the attachments from the specified Outlook Message files.

Parameters
pathThe name of the Outlook Message file.

The following exmaple demonstrates how to destroy attachments in Outlook Message files.

[C#]

//Remove attachments from Outlook Message files
MapiAttachmentCollection attachments = MapiMessage.RemoveAttachments(@"c:\outlookmessage.msg");
//Attachments
foreach(MapiAttachment att in attachments)
{
Console.WriteLine("Attachment Name:"+att.FileName);
att.Save(att.FileName);
}

[Visual Basic]

'Remove attachments from Outlook Message files
MapiAttachmentCollection attachments = MapiMessage.RemoveAttachments("c:\outlookmessage.msg");
'Attachments
For Each att As MapiAttachment In msg.Attachments
Console.WriteLine("Attachment Name:" + att.FileName)
att.Save(att.FileName)
Next
Returns
The attachments collection.

◆ Save() [1/4]

void Aspose::Email::Mapi::MapiMessage::Save ( System::SharedPtr< System::IO::Stream >  stream)

Saves to the specified stream as Msg.

Parameters
streamThe stream.

◆ Save() [2/4]

void Aspose::Email::Mapi::MapiMessage::Save ( System::SharedPtr< System::IO::Stream >  stream,
System::SharedPtr< SaveOptions options 
)

Saves message as a stream with additional options.

Parameters
streamStream into which message is saved.
optionsAdditional options for savingSaveOptions.

◆ Save() [3/4]

void Aspose::Email::Mapi::MapiMessage::Save ( System::String  fileName)

Saves to the specified file as Msg.

Parameters
fileNameName of the file.

◆ Save() [4/4]

void Aspose::Email::Mapi::MapiMessage::Save ( System::String  fileName,
System::SharedPtr< SaveOptions options 
)

Saves message as a file with additional options.

Parameters
fileNameStream into which message is saved.
optionsAdditional options for savingSaveOptions.

◆ SaveAsTemplate() [1/2]

void Aspose::Email::Mapi::MapiMessage::SaveAsTemplate ( System::SharedPtr< System::IO::Stream >  stream)

Saves to the specified stream as Outlook File Template(OFT format).

Deprecated:
Parameters
streamThe stream.

◆ SaveAsTemplate() [2/2]

void Aspose::Email::Mapi::MapiMessage::SaveAsTemplate ( System::String  fileName)

Saves to the specified file as Outlook File Template(OFT format).

Deprecated:
Parameters
fileNameName of the file.

◆ SaveAsTnef() [1/2]

void Aspose::Email::Mapi::MapiMessage::SaveAsTnef ( System::SharedPtr< System::IO::Stream >  stream)

Save message in TNEF format.

Parameters
streamThe stream where a message will be saved to.

◆ SaveAsTnef() [2/2]

void Aspose::Email::Mapi::MapiMessage::SaveAsTnef ( System::String  fileName)

Save message in TNEF format.

Parameters
fileNameName of the file where a message will be saved to.

◆ set_Body()

void Aspose::Email::Mapi::MapiMessage::set_Body ( System::String  value)
overridevirtual

Gets the message text.

The string that represents message body.

Implements Aspose::Email::Mapi::IMapiMessageItem.

◆ set_ClientSubmitTime()

void Aspose::Email::Mapi::MapiMessage::set_ClientSubmitTime ( System::DateTime  value)

Sets the date and time the message sender submitted a message.

If the property was not available, DateTime.MinValue is returned.

The DateTime that represents client submit time.

◆ set_DeliveryTime()

void Aspose::Email::Mapi::MapiMessage::set_DeliveryTime ( System::DateTime  value)

Sets the date and time a message was delivered.

If the property was not available, DateTime.MinValue is returned.

The DateTime that represents delivery time.

◆ set_Headers()

void Aspose::Email::Mapi::MapiMessage::set_Headers ( System::SharedPtr< Mime::HeaderCollection value)

Gets the transport message headers

◆ set_ReadReceiptRequested()

void Aspose::Email::Mapi::MapiMessage::set_ReadReceiptRequested ( bool  value)

Sets a value indicating whether the read receipt is requested.

true if the read receipt is requested; otherwise, false.

◆ set_ReplyTo()

void Aspose::Email::Mapi::MapiMessage::set_ReplyTo ( System::String  value)

Sets the reply to names.

Sets the list of ReplyTo addresses separated by semicolon.

The reply to names.

Exceptions
ArgumentNullExceptionthrows if reply to address is null.
ArgumentExceptionthrows if reply to address is not in a recognized format.

◆ set_SenderEmailAddress()

void Aspose::Email::Mapi::MapiMessage::set_SenderEmailAddress ( System::String  value)

Sets the message sender's e-mail address.

When setting a value, the values of PR_SENDER_SEARCH_KEY and PR_SENDER_ENTRYID properties are updated as well. When setting a null value or empty string, the values of properties are set null.

The string that represents sender email address.

Exceptions
ArgumentExceptionthrows if sender address is not in a recognized format.

◆ set_SenderName()

void Aspose::Email::Mapi::MapiMessage::set_SenderName ( System::String  value)

Sets the message sender's display name.

When setting a null value or empty string, the values of the property get the value equal to SenderEmailAddress.

The the string that represents sender name.

◆ set_SenderSmtpAddress()

void Aspose::Email::Mapi::MapiMessage::set_SenderSmtpAddress ( System::String  value)

Sets the message sender's e-mail address.

When setting a value, the values of PR_SENDER_SEARCH_KEY and PR_SENDER_ENTRYID properties are updated as well. When setting a null value or empty string, the values of properties are set null.

The string that represents sender email address.

Exceptions
ArgumentExceptionthrows if sender address is not in a recognized format.

◆ set_SentRepresentingEmailAddress()

void Aspose::Email::Mapi::MapiMessage::set_SentRepresentingEmailAddress ( System::String  value)

Sets the e-mail address for the messaging user represented by the sender.

When setting a value, the values of PR_SENT_REPRESENTING_SEARCH_KEY and PR_SENT_REPRESENTING_ENTRYID properties are updated as well. When setting a null value or empty string, the values of the property are set null.

The string that represents sent representing email address.

Exceptions
ArgumentExceptionthrows if email address is not in a recognized format.

◆ set_SentRepresentingName()

void Aspose::Email::Mapi::MapiMessage::set_SentRepresentingName ( System::String  value)

Sets the display name for the messaging user represented by the sender.

When setting a null value or empty string, the values of the property are set in SentRepresentingEmailAddress.

The string that represents sent representing name.

◆ SetDateInHeaders()

bool Aspose::Email::Mapi::MapiMessage::SetDateInHeaders ( System::DateTime  submitdate)

◆ SetProperty() [1/3]

void Aspose::Email::Mapi::MapiMessage::SetProperty ( System::SharedPtr< MapiAttachment value,
int64_t  signed_,
int64_t  key 
)

Sets the attachment.

Parameters
valueThe property value.
signedThe value, that indicates that the property is signed.
keyThe property tag.

◆ SetProperty() [2/3]

void Aspose::Email::Mapi::MapiMessage::SetProperty ( System::SharedPtr< MapiRecipient value,
int64_t  signed_,
int64_t  key 
)

Sets the recipient.

Parameters
valueThe property value.
signedThe value, that indicates that the property is signed.
keyThe property tag.

◆ SetProperty() [3/3]

void Aspose::Email::Mapi::MapiMessage::SetProperty ( System::SharedPtr< PropertyDescriptor pd,
System::SharedPtr< System::Object >  value 
)
overridevirtual

Sets MAPI property.

Parameters
pdThe property descriptor.
valueThe property data.

Reimplemented from Aspose::Email::Mapi::MapiPropertyContainer.

◆ SetStringPropertyValue()

void Aspose::Email::Mapi::MapiMessage::SetStringPropertyValue ( int64_t  tag,
System::String  value 
)

Sets the string property value.

Parameters
tagThe property tag.
valueThe property value.

◆ ToMailMessage()

System::SharedPtr<MailMessage> Aspose::Email::Mapi::MapiMessage::ToMailMessage ( System::SharedPtr< MailConversionOptions options)

Creates an instance of MailMessage from this MapiMessage.

Parameters
optionsAllows to specify additional options when converting from MapiMessage to MailMessage.
Returns
Returns a MailMessage instance which is loaded from this MapiMessage.

◆ ToMapiMessageItem()

System::SharedPtr<IMapiMessageItem> Aspose::Email::Mapi::MapiMessage::ToMapiMessageItem ( )

Convert MapiMessage to IMapiMessageItem object in dependence with MessageClass.

Note, that the following message classes are supported by now: IPM.Note, IPM.StickyNote, IPM.Contact, IPM.Activity, IPM.Appointment, IPM.Schedule.meeting, IPM.Task. If MapiMessage has another class, different from these ones, then NotSupportedException is thrown. If MessageClass is IPM.Note, then MapiMessage copy is returned.

Exceptions
System::NotSupportedExceptionThrown when MessageClass doesn't belong to IPM.Note, IPM.StickyNote, IPM.Contact, IPM.Activity, IPM.Appointment, IPM.Schedule.meeting, IPM.Task.
Returns
The IMapiMessageItem interface.

◆ TrySetCodePageFromRtfBody()

void Aspose::Email::Mapi::MapiMessage::TrySetCodePageFromRtfBody ( )

Tries the set code page from RTF body.

Friends And Related Function Documentation

◆ Aspose::Email::Clients::Exchange::Dav::ExchangeClient

◆ Aspose::Email::Clients::Exchange::WebService::CalendarEwsConverter

friend class Aspose::Email::Clients::Exchange::WebService::CalendarEwsConverter
friend

◆ Aspose::Email::Clients::Exchange::WebService::EwsConverterUtils

friend class Aspose::Email::Clients::Exchange::WebService::EwsConverterUtils
friend

◆ Aspose::Email::MailMessage

friend class Aspose::Email::MailMessage
friend

◆ Aspose::Email::Mapi::MailMessageInterpretor

friend class Aspose::Email::Mapi::MailMessageInterpretor
friend

◆ Aspose::Email::Mapi::MapiAttachment

◆ Aspose::Email::Mapi::MapiContactElectronicAddress

◆ Aspose::Email::Mapi::MapiMessageItemBase

◆ Aspose::Email::Mapi::MapiMessageReader

◆ Aspose::Email::Mapi::Nodes::AttachmentDirectory

friend class Aspose::Email::Mapi::Nodes::AttachmentDirectory
friend

◆ Aspose::Email::Mapi::Nodes::RecipientDirectory

friend class Aspose::Email::Mapi::Nodes::RecipientDirectory
friend

◆ Aspose::Email::Mapi::TaskMailMessageInterpretor

friend class Aspose::Email::Mapi::TaskMailMessageInterpretor
friend

◆ Aspose::Email::Storage::Pst::FolderInfo

◆ Aspose::Email::Storage::Pst::Ltp::LtpDoer

friend class Aspose::Email::Storage::Pst::Ltp::LtpDoer
friend

◆ Aspose::Email::Storage::Pst::Ltp::PropertyContext

friend class Aspose::Email::Storage::Pst::Ltp::PropertyContext
friend

◆ Aspose::Email::Storage::Pst::PstDoer

friend class Aspose::Email::Storage::Pst::PstDoer
friend

◆ Aspose::Email::Storage::Pst::PstUtil

friend class Aspose::Email::Storage::Pst::PstUtil
friend

◆ Aspose::Email::Tnef::TnefAttachment

friend class Aspose::Email::Tnef::TnefAttachment
friend

◆ Aspose::Email::Tnef::TnefMessageProperty

friend class Aspose::Email::Tnef::TnefMessageProperty
friend

◆ Aspose::Email::Tools::CalendarConverter

friend class Aspose::Email::Tools::CalendarConverter
friend

◆ Aspose::Email::Tools::ForwardMessageBuilder

◆ Aspose::Email::Tools::ReplyMessageBuilder

Member Data Documentation

◆ ConversionProgressEvent

System::Event<void(System::SharedPtr<ProgressEventHandlerInfo>)> Aspose::Email::Mapi::MapiMessage::ConversionProgressEvent

Event to notify user about progress of conversion/saving.

◆ emlBoundaries

System::SharedPtr<System::Collections::Generic::ListExt<System::String> > Aspose::Email::Mapi::MapiMessage::emlBoundaries
System::SharedPtr< MapiAttachmentCollection > attachments
The collection of attachments.
Definition: MapiMessageItemBase.h:773
MapiMessage()
Initializes a new instance of the MapiMessage class.