TagLib: Mail

message

Description

This tag denotes reference to the current message bean within an enclosing <mail:messages> tag. A message bean may be created and/or referenced by the use of the id or name attributes. The body of this tag may contain get/set tags that will generate output derived from the contents of this bean tag.

Tag Body

JSP

Tag Parent

<mailPrefix:messages>

Restrictions

None.

Attributes

The tag has the following attributes:

Attribute

Description

Req'd?

id Name of the bean to create. No
name Name of the bean to use. No
index
Specifies the index into the current message list of the message bean to find.
No

Properties

The tag provides the following bean properties:

Property

Description

Type

Access

from Provides access to the full address specified in the "From:" header. (example: John Doe <jdoe@somedomain.com> ) String
Get/Set
fromAddress Provides access to just the address specified in the "From:" header, excluding the comment field. String
Get
fromPersonal Provides access to the comment specified in the "From:" header if there is one, excluding the actual address. String
Get
replyTo Provides access to the "Reply-To:" header if the header exists. In the event that it doesn't, the same value as the "from" property is returned. String
Get/Set
replyToAddress Provides access to just the address portions of the "Reply-To:" header if the header exists. In the event that it doesn't, the same value as the "fromAddress" property is returned. String
Get
replyToPersonal Provides access to just the comment portions of the "Reply-To:" header if the header exists and has a comment. In the event that it doesn't, the same value as the "fromPersonal" property is returned String
Get
to Provides access to the entire "To:" message header. String
Get/Set
toAddress Provides access to just the address portions of the "To:" header. String
Get
toAddressReply Provides access to just the address portions of the "To:" header, exluding any address that matches the user's. String
Get
cc Provides access to the entire "Cc:" message header. String
Get/Set
ccAddress Provides access to just the address portions of the "Cc:" header. String
Get
ccAddressReply Provides access to just the address portions of the "Cc:" header, excluding any address that matches the user's. String
Get
bcc Message bcc. String
Set
seen A boolean that indicates if the message has been seen. Boolean
Get
recent A boolean that indicates if the message is recent. Boolean
Get
deleted A boolean that indicates if the message is deleted. Boolean
Get
subject Message subject. String
Get/Set
date Message date. String
Get
text Message text. String
Get/Set

Example(s)

<%-- message tag example --%>
...
<mail:context/>
...
<mail:fetch collection="messages" id="INBOX" sb="date" sd="down"/>
...
<mail:messages id="msgs">
<mail:set property="start" value="$(start)"/>
<mail:set property="count" value="5"/>
</mail:messages>
<mail:messages name="msgs" iterate="true">
<mail:message> <p>Subject: <mail:get property="subject"/> </mail:message> </mail:messages>