com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class MapiMessageItemBase

    • Constructor Detail

      • MapiMessageItemBase

        protected MapiMessageItemBase()

        Initializes a new instance of the MapiMessageItemBase class.

      • MapiMessageItemBase

        protected MapiMessageItemBase(MapiPropertyCollection properties)

        Initializes a new instance of the MapiMessageItemBase class.

        Parameters:
        properties - MapiPropertyCollection
    • Method Detail

      • setProperty

        public void setProperty(PropertyDescriptor pd,
                       Object value)

        Sets MAPI property.

        Parameters:
        pd - The property descriptor.
        value - The property data.
      • setProperty

        public void setProperty(MapiProperty property)

        Sets the property.

        Specified by:
        setProperty in class MapiPropertyContainer
        Parameters:
        property - The property.
        Throws:
        com.aspose.ms.System.ArgumentNullException - If property is null.
        com.aspose.ms.System.ArgumentException - If property data is null.
        com.aspose.ms.System.InvalidOperationException - If data type is not supported.
      • getAttachments

        public MapiAttachmentCollection getAttachments()

        Gets the attachments in the message.

        Value: The attachment collection.
      • getPropertyStream

        public MapiPropertyStream getPropertyStream()

        Gets the property stream.

        Value: The property stream.
      • getNamedProperties

        public MapiPropertyCollection getNamedProperties()

        Gets the named properties of message.

        Value: The collection of named properties.
      • getRecipients

        public MapiRecipientCollection getRecipients()

        Gets the recipients of the message.

        Value: The collection of recipients.
      • setRecipients

        public void setRecipients(MapiRecipientCollection value)

        Gets the recipients of the message.

        Value: The collection of recipients.
      • getSubStorages

        public MapiPropertyCollection getSubStorages()

        Gets the sub storages.

        Value: The sub storages.
      • getNamedPropertyMapping

        public MapiNamedPropertyMappingStorage getNamedPropertyMapping()

        Gets the named property mapping.

        Value: The named property mapping.
      • getSubjectPrefix

        public String getSubjectPrefix()

        Gets a subject prefix that typically indicates some action on a message, such as "FW: " for forwarding.

        Value: The string that represents subject prefix.
      • getBodyType

        public int getBodyType()

        Gets the type of the body.

        Value: The type of the body.
      • getBodyRtf

        public String getBodyRtf()

        Gets or sets the RTF formatted message text.

        Value: The string that represents message body rtf.


        When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated. A string value being set must have RTF format. Thus, if it is necessary to set a value in HTML format, the value must be first to encoded within RTF, according to RTF Extensions Specification. To set the content of the body message in HTML or Plain Text formats quickly, please, use SetBodyContent method. When setting a null value or empty string, the values of BodyRtf and Body properties are set null.

      • setBodyRtf

        public void setBodyRtf(String value)

        Gets or sets the RTF formatted message text.

        Value: The string that represents message body rtf.


        When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated. A string value being set must have RTF format. Thus, if it is necessary to set a value in HTML format, the value must be first to encoded within RTF, according to RTF Extensions Specification. To set the content of the body message in HTML or Plain Text formats quickly, please, use SetBodyContent method. When setting a null value or empty string, the values of BodyRtf and Body properties are set null.

      • getBodyHtml

        public String getBodyHtml()

        Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string.

      • getCompanies

        public String[] getCompanies()

        Contains the names of the companies that are associated with an item.

      • setCompanies

        public void setCompanies(String[] value)

        Contains the names of the companies that are associated with an item.

      • getCategories

        public String[] getCategories()

        Contains keywords or categories for the message object.

      • setCategories

        public void setCategories(String[] value)

        Contains keywords or categories for the message object.

      • getMileage

        public String getMileage()

        Contains the mileage information that is associated with an item.

      • setMileage

        public void setMileage(String value)

        Contains the mileage information that is associated with an item.

      • getBilling

        public String getBilling()

        Contains the billing information associated with an item.

      • setBilling

        public void setBilling(String value)

        Contains the billing information associated with an item.

      • getSensitivity

        public int getSensitivity()

        Gets the Sensitivity.

        Value: The sensitivity.
      • setSensitivity

        public void setSensitivity(int value)

        Gets the Sensitivity.

        Value: The sensitivity.
      • getMessageClass

        public String getMessageClass()

        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.

        Value: The string that represents message class.
        Specified by:
        getMessageClass in interface IMapiMessageItem
        Returns:
        a String object.
      • setMessageClass

        public void setMessageClass(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.

        Value: The string that represents message class.
      • getBody

        public String getBody()

        Gets the message text.

        Value: The string that represents message body.
        Specified by:
        getBody in interface IMapiMessageItem
        Returns:
        a String object.
      • setBody

        public void setBody(String value)

        Gets the message text.

        Value: The string that represents message body.
        Specified by:
        setBody in interface IMapiMessageItem
        Parameters:
        value - a String object.
      • getSubject

        public String getSubject()

        Gets or sets the subject of the message.

        Value: The string that represents message subject.


        When setting a value, the values of SubjectPrefix(PR_SUBJECT_PREFIX) and NormalizedSubject(PR_NORMALIZED_SUBJECT) properties are updated as well. If Subject has no prefix, the value of SubjectPrefix property is set null. When setting a null value or empty string, the values of Subject, SubjectPrefix, NormalizedSubject properties are set null.

        Specified by:
        getSubject in interface IMapiMessageItem
        Returns:
        a String object.
      • setSubject

        public void setSubject(String value)

        Gets or sets the subject of the message.

        Value: The string that represents message subject.


        When setting a value, the values of SubjectPrefix(PR_SUBJECT_PREFIX) and NormalizedSubject(PR_NORMALIZED_SUBJECT) properties are updated as well. If Subject has no prefix, the value of SubjectPrefix property is set null. When setting a null value or empty string, the values of Subject, SubjectPrefix, NormalizedSubject properties are set null.

        Specified by:
        setSubject in interface IMapiMessageItem
        Parameters:
        value - a String object.
      • setsIMapiMessageItemMembers

        protected void setsIMapiMessageItemMembers(String messageClass,
                                       String body,
                                       String subject)

        Sets MessageClass,Body and Subject.

        Parameters:
        messageClass -
        body -
        subject -
      • dispose

        public void dispose()

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable
      • checkIsDisposed

        protected void checkIsDisposed()

        Checks if the object is disposed and raised exception in this case.

      • initNamedPropertyMappingStorage

        protected void initNamedPropertyMappingStorage()

        Inits the named property mapping storage.

      • setBodyContent

        public void setBodyContent(String content,
                          int contentType)

        Sets the content of the body.

        Parameters:
        content - The content.
        contentType - Type of the content.


        It is provided for setting of the content of the body message in RTF, HTML or Plain Text formats. When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated as well. Note, after the value in HTML format is set, BodyRtf property returns the value which is encoded within RTF.

        Throws:
        com.aspose.ms.System.ArgumentNullException - throws if the specified content string is null or empty.
      • setMessageFlags

        public void setMessageFlags(long flags)

        Sets the message flags.

        Parameters:
        flags - The message flags.
      • removeProperty

        public void removeProperty(long tag)

        Provides correctly removing property from all collections.

        Parameters:
        tag - The tag of MapiProperty.
      • updateStorage

        protected void updateStorage(MapiPropertyCollection storages,
                         MapiPropertyStream propStream,
                         long key,
                         String data)

        Updates the storage.

        Parameters:
        storages - The storages.
        propStream - The property stream.
        key - The property tag.
        data - The property data.
      • updateStorage

        protected void updateStorage(MapiPropertyCollection storages,
                         MapiPropertyStream propStream,
                         long key,
                         byte[] bytes)

        Updates the storage.

        Parameters:
        storages - The storages.
        propStream - The property stream.
        key - The property tag.
        bytes - The property data.