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) |
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) |
void |
save(String fileName,
int format)
Saves the current message object to the specified file.
|
public MessageObject(InputStream stream, int loadFormat)
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,System.IO.FileMode)
call.
com.aspose.email.ms.System.IllegalArgumentException
- If specified loadFormat
is not supported.public MessageObjectPropertiesCollection getProperties()
Gets the properties of the MessageObject
.
getProperties
in interface IMessageObjectPropertyContainer
public int getCodepage()
Gets the codepage used to encode/decode string properties in case MapiType.PT_STRING8
type for them is used.
public MessageObjectRecipientsCollection getRecipients()
Gets the recipients of the MessageObject
.
public MessageObjectAttachmentsCollection getAttachments()
Gets the attachments of the MessageObject
.
public 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
call.
com.aspose.email.ms.System.IllegalArgumentException
- If format
value is not valid.public void save(OutputStream stream, int format)
public 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.
Copyright (c) 2008-2013 Aspose Pty Ltd. All Rights Reserved.