public final class MessageObject extends Object implements IMessageObjectPropertyContainer
Represents an Outlook message object. Evaluation limits: only 1 attachment and 1 recipient are read when message is being loaded, watermark will be added when the message is being saved.
| Constructor and Description |
|---|
MessageObject(InputStream stream,
int loadFormat)
Initializes a new instance of the
MessageObject class. |
MessageObject(String fileName,
int loadFormat)
Initializes a new instance of the
MessageObject class. |
| Modifier and Type | Method and Description |
|---|---|
MessageObjectAttachmentsCollection |
getAttachments()
Gets the attachments of the
MessageObject. |
int |
getCodepage()
Gets the codepage used to encode/decode string properties in case
MapiType.PT_STRING8 type for them is used. |
int |
getIdForNamedProperty()
Gets the id to be used for named property,
named properties are special properties and should have their ids in range [0x8000,0xfffe] aligned starting from 0x8000 sequentally.
|
MessageObjectPropertiesCollection |
getProperties()
Gets the properties of the
MessageObject. |
MessageObjectRecipientsCollection |
getRecipients()
Gets the recipients of the
MessageObject. |
void |
save(OutputStream stream,
int format)
Saves the current message object to the specified stream.
|
void |
save(String fileName,
int format)
Saves the current message object to the specified file.
|
public MessageObject(InputStream stream, int loadFormat)
Initializes a new instance of the MessageObject class.
stream - The stream to initialize this object from.loadFormat - The source format message object is stored with.com.aspose.ms.System.ArgumentNullException - If given stream is null.com.aspose.ms.System.ArgumentOutOfRangeException - If specified loadFormat is not supported.public MessageObject(String fileName, int loadFormat)
Initializes a new instance of the MessageObject class.
fileName - Name of the file to read from.loadFormat - The source format message object is stored with.
File.open(String,int) call.
com.aspose.ms.System.ArgumentOutOfRangeException - If specified loadFormat is not supported.public final MessageObjectPropertiesCollection getProperties()
Gets the properties of the MessageObject.
getProperties in interface IMessageObjectPropertyContainerpublic final int getCodepage()
Gets the codepage used to encode/decode string properties in case MapiType.PT_STRING8 type for them is used.
public final MessageObjectRecipientsCollection getRecipients()
Gets the recipients of the MessageObject.
public final MessageObjectAttachmentsCollection getAttachments()
Gets the attachments of the MessageObject.
public final void save(String fileName, int format)
Saves the current message object to the specified file.
fileName - Name of the file.format - The format of the output data.
File.openWrite(String) call.
com.aspose.ms.System.ArgumentOutOfRangeException - If format value is not valid.public final void save(OutputStream stream, int format)
Saves the current message object to the specified stream.
stream - The stream to write to.format - The format of the output data.com.aspose.ms.System.ArgumentNullException - If stream is null.com.aspose.ms.System.ArgumentOutOfRangeException - If format value is not valid.public final int getIdForNamedProperty()
Gets the id to be used for named property, named properties are special properties and should have their ids in range [0x8000,0xfffe] aligned starting from 0x8000 sequentally. Use this method to find the available id cause it could be hard to calculate it yourself.