Email Class

Used to represent a mail message found in a Mail Folder (e.g. "Inbox"). http://msdn.microsoft.com/en-us/library/aa494306%28v=exchg.140%29.aspx

Constructors

Email( )
Email( javaxt.exchange.Email message )
Email( String exchangeID, Connection conn, ExtendedFieldURI[] additionalProperties )
Email( String exchangeID, Connection conn )

Public Methods

getSubject( ) returns String
Returns the subject associated with this message.
setSubject( String subject ) returns void
Used to set/update the subject.
getBody( ) returns String
Used to get the content of the message.
setBody( String description, String format ) returns void
Used to set the content of the message.
description
formatText format ("Best", "HTML", or "Text").
getBodyType( ) returns String
Returns the text encoding used in the body of this item. Possible values include "Best", "HTML", or "Text".
getImportance( ) returns String
Returns the importance assigned to this message. Possible values include "Low", "Normal", and "High".
setImportance( String importance ) returns void
Used to assign an importance to this message.
importancePossible values include "Low", "Normal", and "High"
getSensitivity( ) returns String
Returns the sensitivity level associated with this message. Possible values include "Normal", "Personal", "Private", and "Confidential".
setSensitivity( String sensitivity ) returns void
Used to set the sensitivity level associated with this message.
sensitivityPossible values include "Normal", "Personal", "Private", and "Confidential".
getMessageClass( ) returns String
setMessageClass( String itemClass ) returns void
getFrom( ) returns Mailbox
Returns the Mailbox associated with the sender. Returns null if there is no sender associated with this message (e.g. draft message).

Note that when a Mailbox is returned, the Mailbox may not always include an email address. This is especially true for emails originating from another Exchange account. In this case, you can try to retrieve the domain address associated with the Mailbox and resolve it to an email address via the Mailbox.getDomainAddress() and Mailbox.resolveName() methods.

getDateTimeReceived( ) returns javaxt.utils.Date
Returns the date/time when the message was received. Returns a null if the message is a draft.
getDateTimeSent( ) returns javaxt.utils.Date
Returns the date/time when the message was sent. Returns a null if the message has not been sent (e.g. Draft message).
getSize( ) returns Integer
Returns the size of the message.
getResponse( ) returns String
Returns the last action performed on this message. Possible values include "Forward", "Reply", "ReplyAll", or null.
getResponseDate( ) returns javaxt.utils.Date
Returns the date/time associated with the last action performed on this message. This, in conjunction with the getResponse() method can be used to generate messages like "You replied on 12/13/2012 5:38 PM." or "You forwarded this message on 12/13/2012 6:01 PM."
isRead( ) returns boolean
Returns a boolean used to indicate whether the message has been read.
setIsRead( boolean isRead ) returns void
Returns a boolean used to indicate whether the message has been read.
addRecipient( String list, Mailbox recipient ) returns void
Used to add a recipient to this message.
listPossible values include "To", "Cc", or "Bcc".
recipient
removeRecipient( String list, Mailbox recipient ) returns void
Used to remove a recipient from this message.
listPossible values include "To", "Cc", or "Bcc".
recipient
getToRecipients( ) returns Mailbox[]
Returns an array of all the recipients on the "To" list.
getCcRecipients( ) returns Mailbox[]
Returns an array of all the recipients on the "CC" list.
getBccRecipients( ) returns Mailbox[]
Returns an array of all the recipients on the "BCC" list.
isSharingRequest( ) returns boolean
Returns true if the message is an invitation to share a calendar or contact folder.
acceptSharingRequest( Connection conn ) returns void
Used to accept a sharing invitation, allowing another user access to view the calendar or contacts data.
delete( boolean MoveToDeletedItems, Connection conn ) returns void
Used to delete a message.
MoveToDeletedItemsIf true, moves the item to the deleted items folder. If false, permanently deletes the message.
conn
forward( Connection conn ) returns Email
Creates a forwarded message and saves it to the drafts folder. The message won't be sent until the send() method is called.
reply( Connection conn ) returns Email
Creates a reply message and saves it to the drafts folder. The message won't be sent until the send() method is called.
replyAll( Connection conn ) returns Email
Creates a replyAll message and saves it to the drafts folder. The message won't be sent until the send() method is called.
save( Connection conn ) returns void
Used to save this message.
setHeaders( java.util.HashMap<String,String> headers ) returns void
send( Connection conn ) returns void
Used to send this message. A copy of this message will be saves in the "Sent" folder.
toString( ) returns String