Methods Summary |
---|
public java.io.Serializable | getAttribute(java.lang.String name)Returns the Mail session attribute with the given name, or null
if there is no attribute by that name.
An attribute allows a mailet to give this Mail instance additional information
not already provided by this interface.
A list of currently set attributes can be retrieved using getAttributeNames.
The attribute is returned as a java.lang.Object or some subclass. Attribute
names should follow the same convention as package names. The Mailet API
specification reserves names matching org.apache.james.*
and org.apache.mailet.*.
|
public java.util.Iterator | getAttributeNames()Returns an Iterator containing the attribute names currently available within
this Mail instance. Use the getAttribute(java.lang.String) method with an
attribute name to get the value of an attribute.
|
public java.lang.String | getErrorMessage()The error message, if any, associated with this message. Not sure why this is needed.
|
public java.util.Date | getLastUpdated()
|
public javax.mail.internet.MimeMessage | getMessage()Returns the MimeMessage stored in this message
|
public long | getMessageSize()
|
public java.lang.String | getName()Returns the message name of this message
|
public java.util.Collection | getRecipients()Returns a Collection of MailAddress objects that are recipients of this message
|
public java.lang.String | getRemoteAddr()The remote ip address of the server that connected to send this message
|
public java.lang.String | getRemoteHost()The remote hostname of the server that connected to send this message
|
public MailAddress | getSender()The sender of the message, as specified by the MAIL FROM header, or internally defined
|
public java.lang.String | getState()The current state of the message, such as GHOST, ERROR, or DEFAULT
|
public boolean | hasAttributes()
|
public void | removeAllAttributes()Removes all the attributes associated with this Mail instance.
|
public java.io.Serializable | removeAttribute(java.lang.String name)Removes the attribute with the given name from this Mail instance. After
removal, subsequent calls to getAttribute(java.lang.String) to retrieve
the attribute's value will return null.
|
public java.io.Serializable | setAttribute(java.lang.String name, java.io.Serializable object)Binds an object to a given attribute name in this Mail instance. If the name
specified is already used for an attribute, this method will remove the old
attribute and bind the name to the new attribute.
As instances of Mail is Serializable, it is necessary that the attributes being
Serializable as well
Attribute names should follow the same convention as package names.
The Mailet API specification reserves names matching org.apache.james.*
and org.apache.mailet.*.
|
public void | setErrorMessage(java.lang.String msg)Sets the error message associated with this message. Not sure why this is needed.
|
public void | setLastUpdated(java.util.Date lastUpdated)
|
public void | setMessage(javax.mail.internet.MimeMessage message)Sets the MimeMessage associated with this message via the object.
|
public void | setName(java.lang.String newName)Set the message name of this message
|
public void | setRecipients(java.util.Collection recipients)Method setRecipients.
|
public void | setState(java.lang.String state)Sets the state of this message.
|