|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExchangeMail
Represents an e-mail message stored in an Exchange folder.
A new e-mail can be created with the method ExchangeFolder.createMail(). To save the new e-mail to the folder, call the method save().
This class provides getter and setter methods to access or modify the message's properties.
Example code that displays e-mails from the Inbox received in the past 24 hours:
Exchange exchange = new Exchange("hostname", "username", "password");
ExchangeFolder inbox = exchange.getInboxFolder();
Date now = new Date();
Date oneDayAgo = new Date(now.getTime() - 86400000);
Restriction restriction =
If.Item.DateTimeReceived.isAfterOrEqualTo(oneDayAgo).and().isBefore(now);
ItemsCollection items = inbox.getItems().
restrict(restriction).sortBy(ExchangeItemField.item_DateTimeReceived);
System.out.println("E-mails found: " + items.getCount());
for(ExchangeItem item : items)
{
ExchangeMail mail = (ExchangeMail) item;
System.out.println(mail.getSubject());
}
ExchangeFolder.createMail()
,
ExchangeItem.save()
Method Summary | |
---|---|
void |
addBccRecipient(java.lang.String emailAddress)
|
void |
addCcRecipient(java.lang.String emailAddress)
|
void |
addReplyTo(java.lang.String emailAddress)
|
void |
addToRecipient(java.lang.String emailAddress)
|
ExchangeMail |
forward()
|
java.util.List<ExchangeMailbox> |
getBccRecipientsMailboxes()
|
java.util.List<ExchangeMailbox> |
getCcRecipientsMailboxes()
|
byte[] |
getConversationIndex()
|
java.lang.String |
getConversationTopic()
|
java.lang.String |
getFromEmailAddress()
|
ExchangeMailbox |
getFromMailbox()
|
java.lang.String |
getFromName()
|
java.lang.String |
getInternetMessageId()
|
ExchangeMailbox |
getReceivedByMailbox()
|
ExchangeMailbox |
getReceivedRepresentingMailbox()
|
java.lang.String |
getReferences()
|
java.util.List<ExchangeMailbox> |
getReplyToMailboxes()
|
java.lang.String |
getSenderEmailAddress()
|
ExchangeMailbox |
getSenderMailbox()
|
java.lang.String |
getSenderName()
|
java.util.List<ExchangeMailbox> |
getToRecipientsMailboxes()
|
boolean |
isDeliveryReceiptRequested()
|
boolean |
isRead()
|
boolean |
isReadReceiptRequested()
|
boolean |
isResponseRequested()
|
ExchangeMail |
reply()
Creates a reply to this email message. |
ExchangeMail |
replyAll()
|
void |
send()
Sends this email message. |
void |
setBccRecipient(java.lang.String emailAddress)
|
void |
setBccRecipients(java.util.List<java.lang.String> emailAddresses)
|
void |
setCcRecipient(java.lang.String emailAddress)
|
void |
setCcRecipients(java.util.List<java.lang.String> emailAddresses)
|
void |
setConversationTopic(java.lang.String conversationTopic)
|
void |
setFrom(java.lang.String from)
|
void |
setInternetMessageId(java.lang.String internetMessageId)
|
void |
setIsDeliveryReceiptRequested(boolean isDeliveryReceiptRequested)
|
void |
setIsRead(boolean isRead)
|
void |
setIsReadReceiptRequested(boolean isReadReceiptRequested)
|
void |
setIsResponseRequested(boolean isResponseRequested)
|
void |
setReferences(java.lang.String references)
|
void |
setReplyTo(java.util.List<java.lang.String> emailAddresses)
|
void |
setReplyTo(java.lang.String emailAddress)
|
void |
setToRecipient(java.lang.String emailAddress)
|
void |
setToRecipients(java.util.List<java.lang.String> emailAddresses)
|
Method Detail |
---|
java.lang.String getSenderName() throws ExchangeServiceException
ExchangeServiceException
java.lang.String getSenderEmailAddress() throws ExchangeServiceException
ExchangeServiceException
ExchangeMailbox getSenderMailbox() throws ExchangeServiceException
ExchangeServiceException
void setToRecipients(java.util.List<java.lang.String> emailAddresses) throws ExchangeServiceException
ExchangeServiceException
void addToRecipient(java.lang.String emailAddress) throws ExchangeServiceException
ExchangeServiceException
void setToRecipient(java.lang.String emailAddress) throws ExchangeServiceException
ExchangeServiceException
java.util.List<ExchangeMailbox> getToRecipientsMailboxes() throws ExchangeServiceException
ExchangeServiceException
void setCcRecipients(java.util.List<java.lang.String> emailAddresses) throws ExchangeServiceException
ExchangeServiceException
void addCcRecipient(java.lang.String emailAddress) throws ExchangeServiceException
ExchangeServiceException
void setCcRecipient(java.lang.String emailAddress) throws ExchangeServiceException
ExchangeServiceException
java.util.List<ExchangeMailbox> getCcRecipientsMailboxes() throws ExchangeServiceException
ExchangeServiceException
void setBccRecipients(java.util.List<java.lang.String> emailAddresses) throws ExchangeServiceException
ExchangeServiceException
void addBccRecipient(java.lang.String emailAddress) throws ExchangeServiceException
ExchangeServiceException
void setBccRecipient(java.lang.String emailAddress) throws ExchangeServiceException
ExchangeServiceException
java.util.List<ExchangeMailbox> getBccRecipientsMailboxes() throws ExchangeServiceException
ExchangeServiceException
boolean isReadReceiptRequested() throws ExchangeServiceException
ExchangeServiceException
void setIsReadReceiptRequested(boolean isReadReceiptRequested) throws ExchangeServiceException
ExchangeServiceException
boolean isDeliveryReceiptRequested() throws ExchangeServiceException
ExchangeServiceException
void setIsDeliveryReceiptRequested(boolean isDeliveryReceiptRequested) throws ExchangeServiceException
ExchangeServiceException
byte[] getConversationIndex() throws ExchangeServiceException
ExchangeServiceException
java.lang.String getConversationTopic() throws ExchangeServiceException
ExchangeServiceException
void setConversationTopic(java.lang.String conversationTopic) throws ExchangeServiceException
ExchangeServiceException
java.lang.String getFromName() throws ExchangeServiceException
ExchangeServiceException
java.lang.String getFromEmailAddress() throws ExchangeServiceException
ExchangeServiceException
void setFrom(java.lang.String from) throws ExchangeServiceException
ExchangeServiceException
ExchangeMailbox getFromMailbox() throws ExchangeServiceException
ExchangeServiceException
java.lang.String getInternetMessageId() throws ExchangeServiceException
ExchangeServiceException
void setInternetMessageId(java.lang.String internetMessageId) throws ExchangeServiceException
ExchangeServiceException
boolean isRead() throws ExchangeServiceException
ExchangeServiceException
void setIsRead(boolean isRead) throws ExchangeServiceException
ExchangeServiceException
boolean isResponseRequested() throws ExchangeServiceException
ExchangeServiceException
void setIsResponseRequested(boolean isResponseRequested) throws ExchangeServiceException
ExchangeServiceException
java.lang.String getReferences() throws ExchangeServiceException
ExchangeServiceException
void setReferences(java.lang.String references) throws ExchangeServiceException
ExchangeServiceException
void setReplyTo(java.util.List<java.lang.String> emailAddresses) throws ExchangeServiceException
ExchangeServiceException
void addReplyTo(java.lang.String emailAddress) throws ExchangeServiceException
ExchangeServiceException
void setReplyTo(java.lang.String emailAddress) throws ExchangeServiceException
ExchangeServiceException
java.util.List<ExchangeMailbox> getReplyToMailboxes() throws ExchangeServiceException
ExchangeServiceException
ExchangeMailbox getReceivedByMailbox() throws ExchangeServiceException
ExchangeServiceException
ExchangeMailbox getReceivedRepresentingMailbox() throws ExchangeServiceException
ExchangeServiceException
ExchangeMail reply() throws ExchangeServiceException
ExchangeServiceException
ExchangeMail replyAll() throws ExchangeServiceException
ExchangeServiceException
ExchangeMail forward() throws ExchangeServiceException
ExchangeServiceException
void send() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |