org.jasen.interfaces
Interface JasenMessage

All Superinterfaces:
Serializable
All Known Implementing Classes:
JasenMessageWrapper, StandardJasenMessage

public interface JasenMessage
extends Serializable

Represents a simplified MimeMessage which provides access to the minimal amount of message information required by the engine.

Author:
Jason Polites

Method Summary
 String[] getAttachmentNames()
          Returns the names of all attachments in the message
 String getEnvelopeSender()
           Returns the "envelope" sender.
 javax.mail.internet.InternetAddress getFrom()
          Returns the "From" header address.
 String getHtmlPart()
          Gets the HTML part (if it exists)
 String getTextPart()
          Gets the text/plain part of the message
 

Method Detail

getEnvelopeSender

public String getEnvelopeSender()
                         throws JasenException

Returns the "envelope" sender. This means the "actual" sender of the message.

If this is not known, return the "From" address.

Returns:
The email address of the envelope sender
Throws:
JasenException

getFrom

public javax.mail.internet.InternetAddress getFrom()
                                            throws JasenException
Returns the "From" header address.
If this is not known, return the "From" address or "Reply-To" or "Return-Path"

Returns:
The contents of the From header
Throws:
JasenException

getTextPart

public String getTextPart()
                   throws JasenException
Gets the text/plain part of the message

Returns:
A String representation of the text/plain MIME part in the message
Throws:
JasenException

getHtmlPart

public String getHtmlPart()
                   throws JasenException
Gets the HTML part (if it exists)

Returns:
A String representation of the text/html MIME part in the message, or null if no such part exists
Throws:
JasenException

getAttachmentNames

public String[] getAttachmentNames()
                            throws JasenException
Returns the names of all attachments in the message

Returns:
A String array containing only the filenames of any attachments found in the message, or null if there are none
Throws:
JasenException