Package com.thepluginpeople.jemhod.api
Interface IMessage
public interface IMessage
This bean represents the message in velocity. It's used when running velocity templates during inbound processing.
- Author:
- Fernando Boucquez
-
Method Details
-
getMessageID
String getMessageID()- Returns:
- the message's mime id
-
getSentDate
- Returns:
- the message sent date derived from header value
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getSubject
- Returns:
- the message subject
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getFrom
- Returns:
- the sending from (email and personal) address or null.
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getReplyTo
- Returns:
- the reply to header email and personal
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getSender
- Parameters:
customHeaders
- a list of header names to check in order- Returns:
- the email and personal from the headers according to the strategy
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getTo
- Returns:
- The TO addresses
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getCc
- Returns:
- The CC addresses
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getBcc
- Returns:
- The BCC addresses
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getRecipients
- Returns:
- all the TO, CC and BCC addresses
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getRecipients
- Parameters:
headers
- extra header names to where to find more recipients.- Returns:
- all the TO, CC and BCC addresses including extra headers selected in the parameters.
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getBody
- Returns:
- the body, preferably text, if not found, the html body.
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getFormat
- Returns:
- the format of the body.
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getInReplyToMessageIDs
- Returns:
- the in-reply-to header values
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getReferencesMessageIDs
- Returns:
- the references header values
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getHeaderNames
- Returns:
- All the email header names
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-
getHeader
Returns a list of unprocessed values, each line is a value. Note: this method doesn't split values in each line Example: To: to1@mail.com, to2@mail.com,to3@mail.com To: to4@mail.com, to5@mail.comAssert.assertEquals(Arrays.asList("to1@mail.com, to2@mail.com,to3@mail.com", "to4@mail.com, to5@mail.com"), message.getHeader("To"));
- Parameters:
name
- the header name- Returns:
- a list with 2 values of the header with the provided name;
- Throws:
javax.mail.MessagingException
- if there is an error reading from the mime email.
-