public class EmailMessage extends Item
Constructor and Description |
---|
EmailMessage(ExchangeService service)
Initializes an unsaved local instance of EmailMessage.
|
EmailMessage(ItemAttachment parentAttachment)
Initializes a new instance of the "EmailMessage" class.
|
Modifier and Type | Method and Description |
---|---|
static EmailMessage |
bind(ExchangeService service,
ItemId id)
Binds to an existing e-mail message and loads its first class
property.Calling this method results in a call to EWS.
|
static EmailMessage |
bind(ExchangeService service,
ItemId id,
PropertySet propertySet)
Binds to an existing e-mail message and loads the specified set of
property.Calling this method results in a call to EWS.
|
ResponseMessage |
createForward()
Creates a forward response to the message.
|
ResponseMessage |
createReply(boolean replyAll)
Creates a reply response to the message.
|
void |
forward(MessageBody bodyPrefix,
EmailAddress... toRecipients)
Forwards the message.
|
void |
forward(MessageBody bodyPrefix,
Iterable<EmailAddress> toRecipients)
Forwards the message.
|
EmailAddressCollection |
getBccRecipients()
Gets the list of Bcc recipients for the e-mail message.
|
EmailAddressCollection |
getCcRecipients()
Gets the list of Cc recipients for the e-mail message.
|
byte[] |
getConversationIndex()
Gets the conversation index of the e-mail message.
|
String |
getConversationTopic()
Gets the conversation topic of the e-mail message.
|
EmailAddress |
getFrom()
Gets the "on behalf" sender of the e-mail message.
|
String |
getInternetMessageId()
Gets the Internat Message Id of the e-mail message.
|
boolean |
getIsAssociated()
Gets a value indicating whether this is an associated message.
|
Boolean |
getIsDeliveryReceiptRequested()
Gets a value indicating whether a read receipt is requested for
the e-mail message.
|
Boolean |
getIsRead()
Gets a value indicating whether the e-mail message is read.
|
Boolean |
getIsReadReceiptRequested()
Gets a value indicating whether a read receipt is requested for
the e-mail message.
|
Boolean |
getIsResponseRequested()
Gets a value indicating whether a response is requested for the
e-mail message.
|
ExchangeVersion |
getMinimumRequiredServerVersion()
Gets the minimum required server version.
|
EmailAddress |
getReceivedBy()
Gets the ReceivedBy property of the e-mail message.
|
EmailAddress |
getReceivedRepresenting()
Gets the ReceivedRepresenting property of the e-mail message.
|
String |
getReferences()
Gets the references of the e-mail message.
|
EmailAddressCollection |
getReplyTo()
Gets a list of e-mail addresses to which replies should be addressed.
|
ServiceObjectSchema |
getSchema()
Method to return the schema associated with this type of object.
|
EmailAddress |
getSender()
Gets the sender of the e-mail message.
|
EmailAddressCollection |
getToRecipients()
Gets the list of To recipients for the e-mail message.
|
void |
reply(MessageBody bodyPrefix,
boolean replyAll)
Replies to the message.
|
void |
send()
Sends this e-mail message.
|
void |
sendAndSaveCopy()
Sends this e-mail message and saves a copy of it in the Sent Items
folder.
|
void |
sendAndSaveCopy(FolderId destinationFolderId)
Sends this e-mail message and saves a copy of it in the specified
folder.
|
void |
sendAndSaveCopy(WellKnownFolderName destinationFolderName)
Sends this e-mail message and saves a copy of it in the specified
folder.
|
void |
setFrom(EmailAddress value)
Sets the from.
|
void |
setIsAssociated(boolean value)
Sets the checks if is associated.
|
void |
setIsDeliveryReceiptRequested(Boolean value)
Sets the checks if is delivery receipt requested.
|
void |
setIsRead(Boolean value)
Sets the checks if is read.
|
void |
setIsReadReceiptRequested(Boolean value)
Sets the checks if is read receipt requested.
|
void |
setIsResponseRequested(Boolean value)
Sets the checks if is response requested.
|
void |
setReferences(String value)
Sets the references.
|
void |
setSender(EmailAddress value)
Sets the sender.
|
void |
suppressReadReceipt()
Suppresses the read receipt on the message.
|
copy, copy, delete, getAllowedResponseActions, getAttachments, getBody, getCategories, getConversationId, getCulture, getDateTimeCreated, getDateTimeReceived, getDateTimeSent, getDefaultAffectedTaskOccurrences, getDefaultSendCancellationsMode, getDefaultSendInvitationsMode, getDefaultSendInvitationsOrCancellationsMode, getDisplayCc, getDisplayTo, getEffectiveRights, getExtendedProperties, getHasAttachments, getId, getIdPropertyDefinition, getImportance, getInReplyTo, getInternetMessageHeaders, getIsDraft, getIsFromMe, getIsNew, getIsReminderSet, getIsResend, getIsSubmitted, getIsTimeZoneHeaderRequired, getIsUnmodified, getItemClass, getLastModifiedName, getLastModifiedTime, getMimeContent, getParentAttachment, getParentFolderId, getReminderDueBy, getReminderMinutesBeforeStart, getRootItemId, getSensitivity, getSize, getSubject, getUniqueBody, getWebClientEditFormQueryString, getWebClientReadFormQueryString, hasUnprocessedAttachmentChanges, internalCreate, internalDelete, internalLoad, internalUpdate, isAttachment, move, move, removeExtendedProperty, save, save, save, setBody, setCategories, setCulture, setExtendedProperty, setImportance, setInReplyTo, setIsReminderSet, setItemClass, setMimeContent, setReminderDueBy, setReminderMinutesBeforeStart, setSensitivity, setSubject, throwIfThisIsAttachment, update, validate
addServiceObjectChangedEvent, changed, clearChangeLog, clearServiceObjectChangedEvent, getChangeXmlElementName, getDeleteFieldXmlElementName, getIsCustomDateTimeScopingRequired, getLoadedPropertyDefinitions, getObjectFromPropertyDefinition, getPropertyBag, getService, getSetFieldXmlElementName, getXmlElementName, getXmlElementNameOverride, isDirty, isNew, load, load, loadFromXml, loadFromXml, removeServiceObjectChangedEvent, schema, setService, throwIfThisIsNew, throwIfThisIsNotNew, tryGetExtendedProperty, tryGetProperty, tryGetProperty, writeToXml, writeToXmlForUpdate
public EmailMessage(ExchangeService service) throws Exception
service
- The ExchangeService object to which the e-mail message will be
bound.Exception
- the exceptionpublic EmailMessage(ItemAttachment parentAttachment) throws Exception
parentAttachment
- The parent attachment.Exception
- the exceptionpublic static EmailMessage bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception
service
- the serviceid
- the idpropertySet
- the property setException
- the exceptionpublic static EmailMessage bind(ExchangeService service, ItemId id) throws Exception
service
- the serviceid
- the idException
- the exceptionpublic ServiceObjectSchema getSchema()
public ExchangeVersion getMinimumRequiredServerVersion()
getMinimumRequiredServerVersion
in class Item
public ResponseMessage createReply(boolean replyAll) throws Exception
replyAll
- the reply allException
- the exceptionpublic ResponseMessage createForward() throws Exception
Exception
- the exceptionpublic void reply(MessageBody bodyPrefix, boolean replyAll) throws Exception
bodyPrefix
- the body prefixreplyAll
- the reply allException
- the exceptionpublic void forward(MessageBody bodyPrefix, EmailAddress... toRecipients) throws Exception
bodyPrefix
- the body prefixtoRecipients
- the to recipientsException
- the exceptionpublic void forward(MessageBody bodyPrefix, Iterable<EmailAddress> toRecipients) throws Exception
bodyPrefix
- the body prefixtoRecipients
- the to recipientsException
- the exceptionpublic void send() throws Exception
Exception
- the exceptionpublic void sendAndSaveCopy(FolderId destinationFolderId) throws Exception
destinationFolderId
- the destination folder idException
- the exceptionpublic void sendAndSaveCopy(WellKnownFolderName destinationFolderName) throws Exception
destinationFolderName
- the destination folder nameException
- the exceptionpublic void sendAndSaveCopy() throws Exception
Exception
- the exceptionpublic void suppressReadReceipt() throws Exception
Exception
- the exceptionpublic EmailAddressCollection getToRecipients() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic EmailAddressCollection getBccRecipients() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic EmailAddressCollection getCcRecipients() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic String getConversationTopic() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic byte[] getConversationIndex() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic EmailAddress getFrom() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setFrom(EmailAddress value) throws Exception
value
- the new fromException
- the exceptionpublic boolean getIsAssociated() throws ServiceLocalException
getIsAssociated
in class Item
ServiceLocalException
- the service local exceptionpublic void setIsAssociated(boolean value) throws Exception
value
- the new checks if is associatedException
- the exceptionpublic Boolean getIsDeliveryReceiptRequested() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setIsDeliveryReceiptRequested(Boolean value) throws Exception
value
- the new checks if is delivery receipt requestedException
- the exceptionpublic Boolean getIsRead() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setIsRead(Boolean value) throws Exception
value
- the new checks if is readException
- the exceptionpublic Boolean getIsReadReceiptRequested() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setIsReadReceiptRequested(Boolean value) throws Exception
value
- the new checks if is read receipt requestedException
- the exceptionpublic Boolean getIsResponseRequested() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setIsResponseRequested(Boolean value) throws Exception
value
- the new checks if is response requestedException
- the exceptionpublic String getInternetMessageId() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic String getReferences() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setReferences(String value) throws Exception
value
- the new referencesException
- the exceptionpublic EmailAddressCollection getReplyTo() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic EmailAddress getSender() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setSender(EmailAddress value) throws Exception
value
- the new senderException
- the exceptionpublic EmailAddress getReceivedBy() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic EmailAddress getReceivedRepresenting() throws ServiceLocalException
ServiceLocalException
- the service local exceptionCopyright © 2012–2015 Microsoft. All rights reserved.