com.genesyslab.ail
Interface InteractionMail

All Superinterfaces:
AbstractInteraction, IdObject, Interaction, InteractionMultimedia, Possible, Savable
All Known Subinterfaces:
InteractionInvitationIn, InteractionInvitationOut, InteractionInvitationParentIn, InteractionMailIn, InteractionMailOut, InteractionReplyOut

public interface InteractionMail
extends InteractionMultimedia

An e-mail exchanged between a customer and the Call Center. This is a base class for all e-mail interactions. An InteractionMailIn is an e-mail received by the Call Center, and an InteractionMailOut is an e-mail sent by the Call Center.


Nested Class Summary
static class InteractionMail.Action
          Interaction mail actions.
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.InteractionMultimedia
InteractionMultimedia.StopProcessingReason
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.Interaction
Interaction.Status, Interaction.Type
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.AbstractInteraction
AbstractInteraction.AbstractCallType
 
Field Summary
static java.lang.String QUOTE_HEADER_CONTACT
          The field code for the contact name in the quote phrase.
static java.lang.String QUOTE_HEADER_DATE
          The field code for the date in the quote phrase.
 
Method Summary
 Attachment getAttachment(java.lang.String id)
          Returns the attached file as an Attachment.
 java.util.List getAttachments()
          Returns the attached files as a List of Attachment.
 EmailAddress[] getCcAddresses()
          Returns the addresses that have received a copy of this e-mail.
 java.util.Date getDateSent()
          Returns the date when the message was sent.
 EmailAddress getFromAddress()
          Returns the address from which this e-mail was sent.
 java.lang.String getMessageText()
          Returns the body of this e-mail.
 javax.mail.internet.MimeMessage getMimeMessage()
          Returns the whole content of this e-mail as a MIME message.
 EmailAddress[] getToAddresses()
          Returns the addresses to which this e-mail was sent.
 boolean hasAttachments()
          Returns true if this e-mail has attached files.
 
Methods inherited from interface com.genesyslab.ail.InteractionMultimedia
addSuggestedCategories, delete, getAvailableQueuesForChildInteraction, getAvailableQueuesForThisInteraction, getCategoryId, getExternalId, getInteractionSubtype, getInteractionType, getIsCategoryApproved, getMaxSubjectLength, getMediaType, getQueue, getSuggestedCategories, isMarkDoneAvailable, placeInQueue, setAttachedData, setAvailableQueuesForChildInteraction, setAvailableQueuesForThisInteraction, setCategoryId, setExternalId, setIsCategoryApproved, submit, transferAgent, transferPlace, transferQueue
 
Methods inherited from interface com.genesyslab.ail.Interaction
answerCall, countOtherPendingInteractions, getContactId, getContentBinary, getContentBinaryMimeType, getContentBinarySize, getDateCreated, getDn, getEndDate, getMedia, getNotepad, getParentInteraction, getPlace, getStatus, getStructTextMimeType, getStructuredText, getSubject, getText, getType, getUserName, isDone, markDone, merge, releaseCall, save, setContactId, setContentBinary, setContentBinaryMimeType, setContentBinarySize, setNotepad, setStructTextMimeType, setStructuredText, setSubject, setText
 
Methods inherited from interface com.genesyslab.ail.AbstractInteraction
addInteractionListener, getAttachedData, getAttachedData, getAttachedDataEx, getTConnectionId, queryStatus, removeAttachedData, removeInteractionListener, saveAttachedData, setAttachedData
 
Methods inherited from interface com.genesyslab.ail.Possible
arePossible, isPossible
 
Methods inherited from interface com.genesyslab.ail.Savable
getContactServerId, isDirty
 

Field Detail

QUOTE_HEADER_DATE

static final java.lang.String QUOTE_HEADER_DATE
The field code for the date in the quote phrase. When an e-mail is replied, the reply starts with a phrase like "On <date>, <contact> wrote:". This phrase is defined in the Configuration Layer, in the options of the application, section "Email", item "Quote header".

See Also:
Constant Field Values

QUOTE_HEADER_CONTACT

static final java.lang.String QUOTE_HEADER_CONTACT
The field code for the contact name in the quote phrase. When an e-mail is replied, the reply starts with a phrase like "On <date>, <contact> wrote:". This phrase is defined in the Configuration Layer, in the options of the application, section "Email", item "Quote header".

See Also:
Constant Field Values
Method Detail

getMessageText

java.lang.String getMessageText()
                                throws RequestFailedException
Returns the body of this e-mail. If the e-mail has no mime "text/plain", returns null.

Throws:
RequestFailedException

getMimeMessage

javax.mail.internet.MimeMessage getMimeMessage()
                                               throws RequestFailedException
Returns the whole content of this e-mail as a MIME message.

Throws:
RequestFailedException

getToAddresses

EmailAddress[] getToAddresses()
                              throws RequestFailedException
Returns the addresses to which this e-mail was sent.

Throws:
RequestFailedException

getFromAddress

EmailAddress getFromAddress()
                            throws RequestFailedException
Returns the address from which this e-mail was sent.

Throws:
RequestFailedException

getCcAddresses

EmailAddress[] getCcAddresses()
                              throws RequestFailedException
Returns the addresses that have received a copy of this e-mail.

Throws:
RequestFailedException

getDateSent

java.util.Date getDateSent()
                           throws RequestFailedException
Returns the date when the message was sent. This date can be different from Interaction.getDateCreated().

Throws:
RequestFailedException

hasAttachments

boolean hasAttachments()
                       throws RequestFailedException
Returns true if this e-mail has attached files.

Throws:
RequestFailedException

getAttachments

java.util.List getAttachments()
                              throws RequestFailedException
Returns the attached files as a List of Attachment.

Throws:
RequestFailedException

getAttachment

Attachment getAttachment(java.lang.String id)
                         throws RequestFailedException
Returns the attached file as an Attachment.

Parameters:
id - identifier of the attachment.
Throws:
RequestFailedException