This chapter describes about the Tag Library Mail attributes:
The Calendar Tag Library consists of the following tags:
This tag denotes a reference to the current attachment bean within an enclosing <mail:attachments> tag. An attachment bean may be created and/or referenced by the use of the id or name attributes. Note that an attachment bean contains no accessable properties. This tag is provided as a means of referencing an attachment for the purpose of move/copy operations.
JSP
<mailPrefix:attachments>
None.
n/a
n/a
n/a
The tag denotes reference to a collection of attachments. This tag will iterate upon its body until the collection is exhausted, or as constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".
JSP
n/a
None.
The tag has the following attributes for which the Required value is “No”:
Name of the attachments collection to create.
Name of the attachments collection to use.
A boolean that selects iteration. Default is "false", the collection will not iterate.
During iteration, specifies a name by which the current bean may be retrieved from the PageContext.
The tag provides the following bean properties for which the Type values are “Integer” and “Boolean” and the Access value is “Get/Set”:
Index of the current bean in the collection.
The number of iterations the collection should perform.
The zero-based index from which to begin iteration.
The zero-based index that denotes the item upon which iteration will terminate.
One-based start; suitable for presentation.
One-based end; suitable for presentation.
The size of the collection being paged.
Whether or not there are more items in the collection, beyond the current iterations.
Whether there are items in the collection preceding the current iterations.
n/a
This tag denotes a reference to the current config bean within an enclosing <mail:configs> tag. A config 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.
JSP
<mailPrefix:config>
None.
The tag has the following attributes for which the Required value is “No”:
Name of the bean to create.
Name of the bean to use.
The tag provides the following bean properties for which the Type value is “String” and the Access value is “Get”:
Name of the Configuration from which the information in this bean is derived.
Name of the protocol specified in this Configuration.
n/a
This tag denotes a reference to a collection of configs. This tag will iterate upon its body until the collection is exhausted, or as constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".
JSP
n/a
None.
The tag has the following attributes for which the Required value is “No”:
Name of the configs collection to create.
Name of the configs collection to use.
A boolean that selects iteration. Default is "false", the collection will not iterate.
During iteration, specifies a name by which the current bean may be retrieved from the PageContext.
The tag provides the following bean properties for which the Type values are “Integer” and “Boolean” and the Access value is “Get/Set”:
Index of the current bean in the collection.
The number of iterations the collection should perform.
The zero-based index from which to begin iteration.
The zero-based index that denotes the item upon which iteration will terminate.
One-based start; suitable for presentation.
One-based end; suitable for presentation.
The size of the collection being paged.
Whether or not there are more items in the collection, beyond the current iterations. Boolean.
Whether there are items in the collection preceding the current iterations. Boolean.
n/a
Ensures that a mail context is present within the current pageContext. This tag must appear, at least once, before all other tags within the Mail taglib. If config is not specified, then a search for a useable configuration name is performed in the following fashion:Attempt to retrieve the current mail configuration name from the page context. If that succeeds, use it. If the retrieval fails... Attempt to retrieve the current mail configuration name from the session. If that succeeds, store it on the page context and use it. If the retrieval fails... From the list of all SSOAdapter configuration names, try to find the first useable mail configuration name. If that succeeds, store it in the session and page context and use it. If it is not possible to find a useable mail configuration name, the context tag will fail.Once a configuration name has been determined, an attempt is made to acquire an appropriate mail context object. This is done in the following fashion:Attempt to retrieve a mail context from the page context, and verify it matches the configuration (using the previously acquired configuration name). If that succeeds, use it. If that fails... Attempt to retrieve a mail context from the user's cache of mail contexts. If that succeeds, store it on the page context and use it. If the retrieval fails... Create an SSOAdapter object using the previously acquired configuration name. Create a mail context, and bind it with the SSOAdapter object. Store the mail context in the context cache as well as the page context.In this way, if a mail context has been previously referenced on a page, or within the session, then the config attribute may be omitted, and the most recently referenced context will be retrieved.
JSP or Empty
None.
The tag has the following attributes for which the Required value is “No”:
Specifies the "configuration" for which a mail context should be retrieved.
Permits testing of service availability. Operates according to the following table:
Evaluate tag body when test = true and Skip tag body when test = false.
Skip tag body when test = true and Evaluate tag body when test = false.
The tag provides the following bean properties for which for which the Type values are “String”, “Integer” and “Boolean” and the Access value is “Get”:
Indicates the error code in case the execution of a command tag fails. Possible values:
Empty error code indicates a generic tag execution failed error.
MAIL_001 - Unable to send message because of Invalid email address.
MAIL_002 - Unable to send message.
MAIL_003 - Attempt to create a folder that already exists.
MAIL_004 - Failed to create folder.
Number of messages in the INBOX.
Number of unread messages in the INBOX.
Number of new messages in the INBOX.
Number of messages in the current folder.
Number of unread messages in the current folder.
Number of new messages in the current folder.
User's predefined signature.
A boolean that indicates if there is a message following the message from which was fetched the current lines collection.
A boolean that indicates if there is a message prior to the message from which was fetched the current lines collection.
The index of the message following the message from which was fetched the current lines collection.
The index of the message prior to the message from which was fetched the current lines collection.
A boolean that indicates whether or not the user has any predefined messages.
A boolean that indicates whether or not to include the original message within a reply message.
A boolean that indicates whether or not to append the user's signature onto an outgoing message sent with sendmessage.
<%-- example of context tag usage --%> <mail:context> ... <mail:context> <p>New Message: <mail:get property="inboxNumNewMsgs"/> </mail:context>
Deletes a folder. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
n/a
The tag has the following attributes for which the Required value is “Yes”:
Specifies the name of the folder to delete.
n/a
<%-- deletefolder tag example --%> ... <mail:context/> ... ...
Deletes an email message from the current folder. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
n/a
The tag has the following attributes for which the Required value is “Yes”:
Identifies message to delete. index specifies an entry within the current messages collection.
n/a
<%-- deletemessage tag example --%> <mail:context/> ... ... <mail:deletemessage index="$(idx)"> <p>Fail. </mail:deletemessage> ...
This tag builds a collection of the type specified by the collection attribute. The Mail collections may be considered in the following fashion: A user possesses a collection of "folders". A folder possesses a collection of "messages". A message possesses a collection of "lines". A fetch of any given collection type creates a "current" collection of that type. For example, a fetch of a "messages" collection creates the current "messages" collection. These "current" collections are associated with the current Mail context. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
n/a
The tag has the following attributes for which the Required values are “Yes” and “See below”:
Identifies the type of collection to fetch.
Identifies which collection to fetch.
Indicates which "field" to sort by.
Indicates which direction to sort.
If collection is "messages":
id identifies from which folder to fetch the messages.
sb identifies by which message field to sort by.
sd may be "up" or "down".
n/a
<%-- example of fetch tag --%> <mail:context/> ... <mail:fetch collection="messages" id="INBOX" sb="date" sd="down"> <p>Fail. </mail:fetch> ... <mail:fetch collection="lines" id="0"> <p>Fail. </mail:fetch> ... <mail:lines> <mail:line> <mail:get property="text"/> </mail:line> </mail:lines>
This tag denotes a reference to the current folder "bean" within an enclosing <mail:folders> tag. The body of this tag may contain get tags that will generate output derived from the contents of this "bean" tag.
JSP
<mailPrefix:folders>
None.
The tag has the following attributes for which the Required value is “No”:
Specifies the full name of the folder represented by this bean.
The tag provides the following bean properties for which the Type values are “String”, “Integer” and “Boolean” and the Access value is “Get”:
n/a
n/a
n/a
n/a
n/a
n/a
n/a
The state and contents of this folder can be modified.
<%-- folder tag example --%> ... <mail:context/> ... <mail:fetch collection="folders"/> ... <mail:folders iterate="true"> <mail:folder> <p>Folder Name:<mail:get property="name"/> </mail:folder> </mail:folders>
This tag denotes a reference to a collection of folders. This tag will iterate upon its body until the collection is exhausted, or as constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".
JSP
n/a
None.
The tag has the following attributes for which the Required value is “No”:
Name of the folders collection to create.
Name of the folders collection to use.
A boolean that selects iteration. Default is "false", the collection will not iterate.
During iteration, specifies a name by which the current bean may be retrieved from the PageContext.
The tag provides the following bean properties for which the Type values are “Integer” and “Boolean” and the Access value is “Get/Set”:
Index of the current bean in the collection.
The number of iterations the collection should perform.
The zero based index from which to begin iteration.
The zero based index that denotes the item upon which iteration will terminate.
One-based start; suitable for presentation.
One-based end; suitable for presentation.
The size of the collection being paged.
Whether or not there are more items in the collection, beyond the current iterations.
Whether there are items in the collection preceding the current iterations.
<%-- folders tag example --%> ... <mail:context/> ... <mail:fetch collection="folders"/> ... <mail:folders id="folderlist"> <mail:set property="start" value="$(start)"/> <mail:set property="count" value="5"/> </mail:folders> <mail:folders name="folderlist" iterate="true"> <mail:folder> <p>Folder Name:<mail:get property="name"/> </mail:folder> </mail:folders>
This tag retrieves the specified property. This tag operates exactly like the <util:get> tag and is imported into the mail taglib for convenience. See the util:get tag description for details on how to use this tag.
util:get
util:get
util:get
util:get
<%-- get the subject property --%> <mail:message> <mail:get property="subject"/> </mail:message>
This tag denotes reference to the current indentparagraph bean within an enclosing <mail:indentparagraphs> tag. A indentparagraph 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.
JSP
<mailPrefix:indentparagraphs>
None.
The tag has the following attributes for which the Required value is “No”:
Name of the bean to create.
Name of the bean to use.
Specifies the index into the current indentparagraph list of the indentparagraph bean to find.
The tag provides the following bean properties for which the Type values are “Integer”, “String” and Access value is “Get/Set”:
None
None
n/a
This tag denotes reference to a collection of indentparagraph beans. This tag will iterate upon its body until the collection is exhausted, or as constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".
JSP
n/a
None.
This tag has the following attributes for which the Required value is “No”:
Name of the indentparagraphs collection to create.
Name of the indentparagraphs collection to use.
A boolean that selects iteration. Default is "false", the collection will not iterate.
A boolean that selects iteration. Default is "false", the collection will not iterate.
During iteration, specifies a name by which the current bean may be retrieved from the PageContext.
This tag provides the following bean properties for which the Type values are “Integer”, “Boolean” and Access value is “Get/Set”:
Index of the current bean in the collection.
The number of iterations the collection should perform.
The zero based index from which to begin iteration.
The zero based index that denotes the item upon which iteration will terminate.
One-based start; suitable for presentation.
One-based end; suitable for presentation.
The size of the collection being paged.
Whether or not there are more items in the collection, beyond the current iterations.
Whether there are items in the collection preceding the current iterations.
n/a
This tag denotes a reference to the current line"bean" within an enclosing <mail:lines> tag. The body of this tag may contain get tags that will generate output derived from the contents of this "bean" tag.
JSP
<mailPrefix:lines>
None.
n/a
The tag provides the following bean properties for which the Type value is “String” and the Access value is “Get”:
Current line of text.
<%-- line tag example --%> ... <mail:context/> ... <mail:fetch collection="lines" id="$(msgidx)"/> ... <mail:lines id="llist"> <mail:set property="start" value="$(start)"/> <mail:set property="count" value="5"/> </mail:lines> <mail:lines name="llist" iterate="true"> <mail:line> <mail:get property="text"/> </mail:line> </mail:lines>
The tag denotes a reference to a collection of lines. This collection is expected to reside within the MailContext object, "mail", stored on the current page context. This tag will iterate upon its body until the collection is exhausted, or as constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".
JSP
n/a
None.
The tag has the following attributes for which the Required value is “No”:
Name of the entries collection to create.
Name of the entries collection to use.
A boolean that selects iteration. Default is "false", the collection will not iterate.
The tag provides the following bean properties for which the Type values are “Integer”, “Boolean” and Access value is “Get/Set”:
Index of the current bean in the collection.
The number of iterations the collection should perform. Integer.
The zero-based index from which to begin iteration.
The zero-based index that denotes the item upon which iteration will terminate. Integer.
One-based start; suitable for presentation.
One-based end; suitable for presentation.
The size of the collection being paged.
Whether or not there are more items in the collection, beyond the current iterations.
Whether there are items in the collection preceding the current iterations.
<%-- lines tag example --%> ... <mail:context/> ... <mail:fetch collection="lines" id="$(msgidx)"/> ... <mail:lines id="llist"> <mail:set property="start" value="$(start)"/> <mail:set property="count" value="5"/> </mail:lines> <mail:lines name="llist" iterate="true"> <mail:line> <mail:get property="text"/> </mail:line> </mail:lines>
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.
JSP
<mailPrefix:messages>
None.
The tag has the following attributes for which the Required value is “No”:
Name of the bean to create.
Name of the bean to use.
Specifies the index into the current message list of the message bean to find.
The tag provides the following bean properties for which the Type values are “String”, “Boolean” and Access value is “Get/Set”:
Provides access to the full address specified in the "From:" header. (example: John Doe <jdoe@somedomain.com>)
Provides access to just the address specified in the "From:" header, excluding the comment field.
Provides access to the comment specified in the "From:" header if there is one, excluding the actual address.
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.
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.
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.
Provides access to the entire "To:" message header.
Provides access to just the address portions of the "To:" header.
Provides access to just the address portions of the "To:" header, exluding any address that matches the user's.
Provides access to the entire "Cc:" message header.
Provides access to just the address portions of the "Cc:" header.
Provides access to just the address portions of the "Cc:" header, excluding any address that matches the user's.
Message bcc.
A boolean that indicates if the message has been seen.
A boolean that indicates if the message is recent.
A boolean that indicates if the message is deleted.
Message subject.
Message date.
Message text.
<%-- 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>
This tag denotes a reference to a collection of messages. This tag will iterate upon its body until the collection is exhausted, or as constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".
JSP
n/a
None.
This tag has the following attributes for which the Required value is “No”:
Name of the entries collection to create.
Name of the entries collection to use.
A boolean that selects iteration. Default is "false", the collection will not iterate.
During iteration, specifies a name by which the current bean may be retrieved from the PageContext.
This tag provides the following bean properties for which the Type values are “Integer”, “Boolean” and Access value is “Get/Set”:
Index of the current bean in the collection. Integer.
The number of iterations the collection should perform. Integer.
The zero based index from which to begin iteration. Integer.
The zero based index that denotes the item upon which iteration will terminate. Integer.
One-based start; suitable for presentation.
One-based end; suitable for presentation.
The size of the collection being paged. Integer.
Whether or not there are more items in the collection, beyond the current iterations. Boolean
Whether there are items in the collection preceding the current iterations. Boolean
<%-- messages 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>
Moves or copies a message from one folder to another. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
n/a
The tag has the following attributes for which the Type values are “Integer”, “String” and the Required value is “Yes”, “No”:
Destination folder name.
If src is specified, then index references a message within that folder. If src is not specified, then index references a message within the current messages collection.
If "copy", message is copied, otherwise, message is moved. If not specified, message is moved.
n/a
n/a
Creates a new folder. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
n/a
The tag has the following attributes for which the Type value is “String” and the Required value is “Yes” and “No”:
Name of the folder to create.
If specified, a "/" is appended and the result is prepended to the value specified by foldername.
n/a
n/a
Transfers messages from the POP server described by the Configuration identified by config, to the designated folder on the mail server to which the current mail context has reference. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
n/a
The tag has the following attributes for which the Type value is “String” and the Required value is “Yes”:
Name of the Configuration that references a POP server.
n/a
n/a
The presetmsg tag provides access to the preset message properties of the current message in the preset messages collection.
JSP
Unlike most bean tags, the presetmsg tag can only be used with the presetmsgs collection tag to provide a handle on the current preset message in the collection.
None
The tag provides the following bean properties for which the Type values are “String”, “Integer” and the Required value is “Get/Set”:
Text of the preset message.
Number of the preset message.
<%-- list all the preset messages --%> <mail:presetmsgs iterate="true"> <mail:presetmsg> preset msg text = <mail:get property="msg"/> </mail:presetmsg> </mail:presetmsgs>
This tag provides access to the collection of preset messages. The tag body will be evaluated once for each item in the collection, unless constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".
JSP
Use the presetmsg tag to access the current preset message item in the collection iteration.
The tag has the following attributes for which the Required value is “No”:
Name of the presetmsgs collection to create.
Name of the presetmsgs collection to use.
A boolean that selects iteration. Default is "false", the collection will not iterate.
During iteration, specifies a name by which the current bean may be retrieved from the PageContext.
The tag provides the following bean properties for which the Type values are “Boolean”, “Integer” and the Required value is “Get/Set”:
Index of the current bean in the collection.
The number of iterations the collection should perform.
The zero-based index from which to begin iteration.
The zero-based index that denotes the item upon which iteration will terminate.
One-based start; suitable for presentation.
One-based end; suitable for presentation.
The size of the collection being paged.
Whether or not there are more items in the collection, beyond the current iterations.
Whether there are items in the collection preceding the current iterations.
<%-- list all the preset messages --%> <mail:presetmsgs iterate="true"> <mail:presetmsg> preset msg text = <mail:get property="msg"/> </mail:presetmsg> </mail:presetmsgs>
Renames a folder. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
n/a
This tag has the following attributes for which the Required values are “Yes” and “No”:
Specifies the new name of the folder.
Specifies the name of the folder to be renamed.
If specified, a "/" is appended and the result is prepended to the value specified by foldername.
n/a
n/a
Sends an email message. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
None.
The tag has the following attributes for which the Required values are “Yes” and “No”:
Name of Message bean relating to message to send.
Specifies index of message to forward.
Specified index of message to reply to.
n/a
<%-- sendmessage tag example --%> ... <mail:context/> ... <mail:message id="foo"> <mail:set property="to" value="$(to)"/> <mail:set property="subject" value="$(subject)"/> <mail:set property="text" value="$(text)"/> </mail:message> ... <mail:sendmessage msgname="foo"> <p>Fail. </mail:sendmessage> ...
This tag updates the specified property. It operates exactly like the <util:set> tag and is imported into the mail taglib for convenience. See the util:set tag description for details on how to use this tag.
util:set
util:set
util:set
util:set
<%-- set the message subject property --%> <mail:message> <mail:set property="subject" value="new subject"/> </mail:message>
This tag denotes reference to the current view bean within an enclosing <mail:views> tag. A view 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.
JSP
<mailPrefix:views>
None.
This tag has the following attributes for which the Required value is “No”:
Name of the bean to create.
Name of the bean to use.
This tag provides the following bean properties for which the Type values are “String”, Integer, and the Access value is “Get”:
None
None
n/a
The tag denotes reference to a collection of views. This tag will iterate upon its body until the collection is exhausted, or as constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".
JSP
n/a
None.
The tag has the following attributes for which the Required value is “No”:
Name of the views collection to create.
Name of the views collection to use.
A boolean that selects iteration. Default is "false", the collection will not iterate.
During iteration, specifies a name by which the current bean may be retrieved from the PageContext.
The tag provides the following bean properties for which the Type values are “Integer”, “Boolean” and the Access value is “Get/Set”:
Index of the current bean in the collection.
The number of iterations the collection should perform.
The zero based index from which to begin iteration.
The zero based index that denotes the item upon which iteration will terminate.
One-based start; suitable for presentation.
One-based end; suitable for presentation.
The size of the collection being paged.
Whether or not there are more items in the collection, beyond the current iterations.
Whether there are items in the collection preceding the current iterations.
n/a