jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From catl...@apache.org
Subject cvs commit: jakarta-taglibs/mailer/xml mailer.xml
Date Mon, 13 Aug 2001 23:53:53 GMT
catlett     01/08/13 16:53:53

  Added:       mailer/xml mailer.xml
  Log:
  updated taglib to the new build process
  
  Revision  Changes    Path
  1.1                  jakarta-taglibs/mailer/xml/mailer.xml
  
  Index: mailer.xml
  ===================================================================
  <?xml version="1.0" ?>
  
  <!-- Change all instances of session with the jakarta-taglib 
       name for this tag library.
  
       Change all instances of Mailer with the name to use
       for things such as titles in the tag library documentation.
  
       Change all instances of {your-name} with your name for
       for things such as author name in the tag library documentation.
  
       Change <prefix>foo</prefix> below to a short prefix for this
       tag library.
       -->
  
  <document url="./mailer.xml">
  
  <!-- More properties can be added.  Good place to stick loose
       data needed elsewhere. -->
  <properties>
    <!-- The title here overrides the title generated by the 
         stylesheet for the documentation HTML <title> tag
    <title>Jakarta Project: Mailer JSP Tag Library</title>
         -->
    <!-- The name here is used in the HTML <meta name="author"...> tag -->
    <author>Rich Catlett</author>
  </properties>
  
  <!-- The following defines elements uses both to create the taglib
       documentation and the tag library descriptor .tld file.  The
       elements used are those from the JSP 1.2 TLD DTD and special
       elements used when creating the tagib documentation.  Although
       the JSP1.2 TLD DTD is used, this document can be used to
       generate both a JSP 1.1 and a JSP 1.2 TLD.
       -->
  <taglib>
    <!-- The following elements are from the JSP 1.2 TLD DTD -->
    <!-- Version number of this tagib -->
    <tlib-version>1.0</tlib-version>
    <!-- Minimum version of JSP spec required -->
    <jsp-version>1.1</jsp-version>
    <!-- jakarta-taglib name of this tag library -->
    <short-name>mailer</short-name>
    <!-- URI of taglib -->
    <uri>http://jakarta.apache.org/taglibs/mailer-1.0</uri>
    <!-- The name to use in titles, etc. for the taglib -->
    <display-name>Mailer Tag library (Pre Beta)</display-name>
  
    <description>
     <P>This custom tag library is used to send e-mail.<br/>
     </P>
     <P>E-mail can be sent in three ways.  The first way requires the name of the 
       SMTP host to use. The second requires the name of a JNDI Resource for a 
       JavaMail Session.  The third requires the name of a JNDI Resource for a 
       JavaMail MimePartDataSource.  Refer to your servlet container documentation
       to determine which of these three methods you should use. During the 
       creation of an e-mail message, the addresses are checked for the correct 
       format.  After the e-mail message has been created the send tag spawns a 
       thread to send the message in the background so that the user does not have
       to wait for the SMTP host if it is busy.
     </P>
     <PRE>
  <!-- Create a message by entering the name of the SMTP host. -->
  <!-- The default for this attribute is localhost; for a host other -->
  <!-- than localhost supply it's name with the <B>server</B> attribute -->
  <!-- as in the example below.  The body of the e-mail is supplied in the -->
  <!-- message tag. The send tag is necessary to send the message. -->
  <mt:mail server="home.net" to="foo@home.net"
  from="bar@home.net" subject="mail taglib">
      <mt:message>[<I>body of message</I>]</mt:message>
      <mt:send/>
  </mt:mail>
  <br/>
  <!-- Using a JNDI named JavaMail Session object defined by the -->
  <!-- <B>session</B> attribute. -->
  <mt:mail session="java:/comp/env/session" to="foo@home.net"
  from="bar@home.net" subject="mail taglib">
      <mt:message>[<I>body of message</I>]</mt:message>
      <mt:send/>
  </mt:mail>
  <br/>
  <!-- Or using a JNDI named JavaMail MimePartDataSource object -->
  <!--  defined by <B>mimeMessage</B> attribute. -->
  <mt:mail mimeMessage="java:/comp/env/message" to="foo@home.net"
  from="bar@home.net" subject="mail taglib">
      <mt:message>[<I>body of message</I>]</mt:message>
      <mt:send/>
  </mt:mail>
  <br/>
  </PRE>
     <P>How e-mail is delivered depends on the JavaMail SMTP host settings.  The 
       JavaMail SMTP host can be configured by your Servlet Container so that 
       bounced or undeliverable e-mails are returned to the sender by setting the 
       folowing properties.</P><br/>
  
     <TABLE BORDER="1">
      <TR>
       <TH>Name</TH>
       <TH>Type</TH>
       <TH>Description</TH>
      </TR>
  
      <TR>
       <TD>mail.smtp.dsn.notify</TD>
       <TD>String</TD>
       <TD>Property determines if the user will be notified of undeliverable mail.
          Either NEVER, or some combination of SUCCESS, FAILURE, and DELAY 
          (separated by commas).
       </TD>
      </TR>
  
      <TR>
       <TD>mail.smtp.dsn.ret</TD>
       <TD>String</TD>
       <TD>Determines what part of the undeliverable message will be returned in 
          the message to the sender.  Either FULL or HDRS.
       </TD>
      </TR>
  
      <TR>
       <TD>mail.smtp.sendpartial</TD>
       <TD>boolean</TD>
       <TD>
         If set to true, and a message has some valid and some invalid addresses,
         send the message anyway, reporting the partial failure with a
         SendFailedException.  If set to false (the default), the message is not
         sent to any of the recipients if there is an invalid recipient address.
       </TD>
      </TR>
     </TABLE>
    </description> 
  
    <!-- The taglib-location is used to fill in the web.xml configuration
         information in the HTML doc. -->
    <taglib-location>/WEB-INF/mailer.tld</taglib-location>
  
    <!-- The prefix is used to fill in the taglib directive
         configuration information in the HTML doc. -->
    <prefix>mt</prefix>
  
    <!-- This element must be straight text and is copied right into
         the "Requirements" section of the HTML doc. -->
    <requirements-info>
      This custom tag library requires a servlet container that supports the 
      JavaServer Pages Specification, version 1.1 or higher.  
      <A HREF="http://java.sun.com/products/javamail">JavaMail 1.2</A> and the

      <A HREF="http://java.sun.com/products/glasgow/jaf.html">JavaBeans Activation Framework</A>
should be installed as extensions to your JVM.
    </requirements-info>
  
    <tagtoc name="Mailer Tags">
      <tag>
        <name>mail</name>
        <tag-class>org.apache.taglibs.mailer.MailTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>page</display-name>
  
        <description>
  	Used to create an e-mail message. Most attributes set via a tag within 
  	the body of this tag will take precedence and override any value that 
  	was set as an attribute in this tag. In the case of the three add tags, 
  	however, an address set as an attribute will not be overridden, but will
  	be the first address in the list.
        </description>
    
        <summary>
  	 Used to create an e-mail message. Most attributes set via a tag
  	 within the body of this tag will take precedence and override any value
  	 that was set as an attribute in this tag. In the case of the three add 
  	 tags, however, an address set as an attribute will not be overridden, 
  	 but will be the first address in the list.
        </summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
  <!--  not yet implemented
        <attribute>
          <name>authenticate</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    A value of true of false tells the mailer taglib if the mail server
  	    uses authentication. The default value is false. If the value is set
  	    to true and the mail server uses authentication the user will be 
  	    prompted for a name and password before the mail is sent.
  	</description>
          <availability>1.1</availability>
        </attribute>
  -->
  
        <attribute>
          <name>server</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    This attribute allows you to set the SMTP host if it is going to be
  	    other than localhost.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>session</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    This attribute allows a message to be created using a predefined, 
  	    JNDI named Session object.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>mimeMessage</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    This attribute allows a message to be created using a predefined, 
  	    JNDI named MimePartDataSource.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>to</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The To address of the e-mail. Accepts a comma separated list of 
  	    addresses.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>replyTo</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The Reply-To address of the e-mail. Accepts a comma separated list 
  	    of addresses.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>from</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The From address of the e-mail.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>cc</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The Carbon Copy address of the e-mail. Accepts a comma separated 
  	    list of addresses.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>bcc</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The Blind Carbon Copy address of the e-mail. Accepts a comma 
  	    separated list of addresses.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>subject</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The Subject of the e-mail.
  	</description>
          <availability>1.0</availability>
        </attribute>
          
        <example>
          <usage>
            <comment>
              Send a basic message: set the to, from, and subject attributes. The 
  	    server attribute is not set, therefore the default setting of 
  	    localhost will be used for the SMTP host.
            </comment>
            <code>
  <![CDATA[ 
  <mt:mail to="foo@home.net" from="bar@home.net"subject="mail taglib">
       <mt:message>[body of message]</mt:message>
       <mt:send/> 
  </mt:mail> 
  ]]>       
            </code>  
          </usage>  
        </example>
            
      </tag>
  
      <tag>
        <name>message</name>
        <tag-class>org.apache.taglibs.mailer.MessageTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>message</display-name>
  
        <description>
          Used to set the body of the message.
  	Message will appear as it is written, any carriage returns and spaces in
  	the JSP will be present in the delivered message.
        </description>
        
        <summary>
  	Used to set the body of the message.
  	Message will appear as it is written, any carriage returns and spaces in
  	the JSP will be present in the delivered message.
        </summary>
        <availability>1.0</availability> 
        <restrictions>
  	Must be nested within a mail tag.<br/>Must occur before send tag.
        </restrictions>
  
        <attribute>
          <name>type</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    This attribute has two possible values text or html. If text is 
  	    selected the body of the message is just plain text (it has no html 
  	    tags within it). If html is selected then the body of the message 
  	    can contain HTML tags. The default value for this attribute is text.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Send a basic message: set the to, from, and subject attributes. The 
  	    type attribute is not used in the message tag, it defaults to text.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net"subject="mail taglib">
       <mt:message>[body of message]</mt:message>
       <mt:send/> 
  </mt:mail> 
  ]]>               
            </code>
  	  <comment>
  	    Send the same message only this time HTML tags are included in the 
  	    body of the message for formatting.
  	  </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net" subject="mail taglib">
       <mt:message type="html">
          [body of message containing html formatting]
       </mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>               
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>header</name>
        <tag-class>org.apache.taglibs.mailer.HeaderTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>header</display-name>
    
        <description>
           Used to set extra headers in the message. See  
  	 <A HREF="http://www.stopspam.org/email/headers/headers.html">Documentation</A>
for further information on other e-mail headers.
        </description>
  
        <summary>
  	Used to set extra headers in the message. See  
  	<A HREF="http://www.stopspam.org/email/headers/headers.html">Documentation</A>
for further information on other e-mail headers.     	
        </summary> 
        <availability>1.0</availability>                         
        <restrictions>
  	Must be nested within a mail tag.<br/>Must occur before send tag.
        </restrictions>
  
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The name of the header to be set.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>value</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The value of the extra header to be set. This can also be placed in 
  	    the body of the tag (see example).
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <example>                        
          <usage>
            <comment>
              Set the header Precedence with the value as an attribute.
            </comment>
            <code>   
  <![CDATA[         
  <mt:mail to="foo@home.net" from="bar@home.net" subject="mail taglib">
       <mt:header name="Precedence" value="bulk"/>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>
            </code>
  	  <comment>
  	    Set the header Precedence with the value set in the body of the tag.
  	  </comment>
  	  <code>
  <![CDATA[
  <mt:mail to="foo@home.net" from="bar@home.net" subject="mail taglib">
       <mt:header name="Precedence">bulk</header>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>
  	  </code>
          </usage>
        </example>
      
      </tag>
  
      <tag>
        <name>setrecipient</name>
        <tag-class>org.apache.taglibs.mailer.SetRecipientTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>setrecipient</display-name>
    
        <description>
           Used to set any type of recipient to an e-mail. Two attributes are 
  	 required, type and setress. Type may be either "to", "cc", or "bcc" and
  	 address should be a string representation of the recipients e-mail 
  	 address.
        </description>
  
        <summary>
  	 
        </summary> 
        <availability>1.0</availability>                         
        <restrictions>
  	Must be nested within a mail tag.<br/>Must occur before send tag.
        </restrictions>
  
        <attribute>
          <name>type</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The type of address to be set either "to", "cc", or "bcc".
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>address</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The valid address that is to be set.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <example>                        
          <usage>
            <comment>
              Set the to address in the e-mail message to jdoe@home.net using the
  	    address attribute. 
            </comment>
            <code>   
  <![CDATA[         
  <mt:mail from="bar@home.net" subject="mailer taglib">
       <mt:setrecipient type="to" address="jdoe@home.net"/>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>
            </code>
  	  <comment>
  	    Set the cc addresses to foo@home.net and geo@place.net in the e-mail
  	    message.
  	  </comment>
  	  <code>
  <![CDATA[
  <mt:mail to="jdoe@home.net" from="bar@home.net" subject="mailer taglib">
       <mt:setrecipient type="cc">foo@home.net,geo@place.net</mt:setrecipient>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>
  	  </code>
          </usage>
        </example>
      
      </tag>
  
      <tag>
        <name>addrecipient</name>
        <tag-class>org.apache.taglibs.mailer.AddRecipientTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>addrecipient</display-name>
    
        <description>
           Used to add any type of recipient to an already existant list of 
  	 recipients in an e-mail message. Two attributes are required, type and 
  	 address.  Type may be either "to", "cc", or "bcc" and address should be
  	 a string representation of the recipients e-mail address.
        </description>
  
        <summary>
  	 Used to add any type of recipient to an already existant list of 
  	 recipients in an e-mail message. Two attributes are required, type and 
  	 address.  Type may be either "to", "cc", or "bcc" and address should be
  	 a string representation of the recipients e-mail address.
        </summary> 
        <availability>1.0</availability>                         
        <restrictions>
  	Must be nested within a mail tag.<br/>Must occur before send tag.
        </restrictions>
  
        <attribute>
          <name>type</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The type of address list either "to", "cc", or "bcc" this address is
  	    to be added to.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>address</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The valid address that is to be set.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <example>                        
          <usage>
            <comment>
              Add the to address jdoe@home.net in the e-mail message using the 
  	    address attribute. 
            </comment>
            <code>   
  <![CDATA[         
  <mt:mail from="bar@home.net" subject="mailer taglib">
       <mt:addrecipient type="to" address="jdoe@home.net"/>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>
            </code>
  	  <comment>
  	    Add the bcc addresses foo@home.net and geo@place.net to the e-mail 
  	    message.
  	  </comment>
  	  <code>
  <![CDATA[
  <mt:mail to="jdoe@home.net" from="bar@home.net" subject="mailer taglib">
       <mt:addrecipient type="bcc">foo@home.net,geo@place.net</mt:addrecipient>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>
  	  </code>
          </usage>
        </example>
      
      </tag>
  
      <tag>
        <name>replyto</name>
        <tag-class>org.apache.taglibs.mailer.ReplyToTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>replyto</display-name>
  
        <description>
           Used to set one or more Reply-To addresses in the message.
        </description>
        
        <summary>
  	 Used to set one or more Reply-To addresses in the message.
        </summary>
        <availability>1.0</availability> 
        <restrictions>
  	Must be nested within a mail tag.<br/>Must occur before send tag.
        </restrictions>
  
        <example>
          <usage>
            <comment>
              Set the replyto address in the e-mail message to sax@home.net. 
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net" subject="mailer taglib">
       <mt:replyto>sax@home.net</mt:replyto>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail>
  ]]>               
            </code>
            <comment>
              Set replyto addresss in the e-mail message to sax@home.net and 
  	    cur@blank.com.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net" subject="mailer taglib">
       <mt:replyto>sax@home.net,cur@blank.com</mt:replyto>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail>
  ]]>               
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>from</name>
        <tag-class>org.apache.taglibs.mailer.FromTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>from</display-name>
  
        <description>
           Used to set the From address of the message.
        </description>
        
        <summary>
  	 Used to set the From address of the message.
        </summary>
        <availability>1.0</availability> 
        <restrictions>
  	Must be nested within a mail tag.<br/>Must occur before send tag.
        </restrictions>
  
        <example>
          <usage>
            <comment>
              Set the from address in the e-mail message to bar@home.net.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="joe@place.home">
       <mt:from>bar@home.net</mt:from>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>               
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>attach</name>
        <tag-class>org.apache.taglibs.mailer.AttachTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>attach</display-name>
  
        <description>
           Used to add an attachment to an e-mail message. It is possible to add 
  	 an attachment in one of three ways. First give the name of the file 
  	 that is to be added. Second give the URL that points to the resource 
  	 that is to be added. Third include the attachment in the body of the 
  	 attach tag, in this case it is necessary to use the type attribute and 
  	give the mime type of the attachment.
        </description>
        
        <summary>
  	 Used to add an attachment to an e-mail message. It is possible to add 
  	 an attachment in one of three ways. First give the name of the file 
  	 that is to be added. Second give the URL that points to the resource 
  	 that is to be added. Third include the attachment in the body of the 
  	 attach tag, in this case it is necessary to use the type attribute and 
  	give the mime type of the attachment.
        </summary>
        <availability>1.0</availability> 
        <restrictions>
  	Must be nested within a mail tag.<br/>Must occur before send tag.
        </restrictions>
  
        <attribute>
          <name>file</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The name of the file to be included as an attachment. The name of 
  	    the file must be a path or file name realative to the root directory
  	    of the web application. If the value of the file attribute equals ""
  	    (it is left empty) the tag will extract the name of the file from 
  	    the body of the tag.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>url</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The URL of a resource to be included as an attachment. The URL must 
  	    be given as the full url like http://www.somedomain.com. If the 
  	    value of the url attribute equals "" (it is left empty) the url will
  	    be extracted from the body of the tag.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>type</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	    The mime type of the attachment that is included within the body of 
  	    the attach tag.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Add the file mail/duck.gif as an attachment to the e-mail message.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net" subject="test">
       <mt:message>[body of message]</mt:message>
       <mt:attach file="mail/duck.gif"/>
       <mt:send/>
  </mt:mail>
  ]]>               
            </code>
            <comment>
              Add the resource named by the following url 
  	    http://www.someplace.com/stuff.html as an attachment to the e-mail 
  	    message. Name the url in the body of the attach tag.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net" subject="test">
       <mt:message>[body of message]</mt:message>
       <mt:attach url="">
          http://www.someplace.com/stuff.html
       </mt:attach>
       <mt:send/>
  </mt:mail>
  ]]>               
            </code>
            <comment>
              Add the body of the attach tag as an attachment.  When the message 
  	    comes "This is just a test" will be formatted with some html  tags.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net" subject="test">
       <mt:message>[body of message]</mt:message>
       <mt:attach type="text/html">
          <h1>This is just a test</h1>
       </mt:attach>
       <mt:send/>
  </mt:mail> 
  ]]>               
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>subject</name>
        <tag-class>org.apache.taglibs.mailer.SubjectTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>subject</display-name>
  
        <description>
           Used to set the subject in the message.
        </description>
        
        <summary>
  	 Used to set the subject in the message.
        </summary>
        <availability>1.0</availability> 
        <restrictions>
  	Must be nested within a mail tag.<br/>Must occur before send tag.
        </restrictions>
  
        <example>
          <usage>
            <comment>
              Set subject to "learning about the mail tag library" in the e-mail 
  	    message.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail>
       <mt:setrecipient>foo@home.net</mt:setrecipient>
       <mt:from>bar@home.net</mt:from>
       <mt:subject>learning about the mail tag library</mt:subject>
       <mt:message>[body of message]</mt:message>
       <mt:send/>
  </mt:mail> 
  ]]>               
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>send</name>
        <tag-class>org.apache.taglibs.mailer.SendTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>send</display-name>
  
        <description>
           Used to send the message. If an error occured while creating the e-mail
  	 message and it cannot be sent, the body of this tag will be output to 
  	 the browser. It is within the body of this tag where the page author 
  	 can include an error message if it is desired.
        </description>
        
        <summary>
  	 Used to send the message. If an error occured while creating the e-mail
  	 message and it cannot be sent, the body of this tag will be output to 
  	 the browser. It is within the body of this tag where the page author 
  	 can include an error message if it is desired.
        </summary>
        <availability>1.0</availability> 
        <restrictions>
  	Must be nested within a mail tag.<br/>Must be the last tag nested within
  	the mail tag.
        </restrictions>
  
        <example>
          <usage>
            <comment>
              Send a message in which the following  "An error has occurred, 
  	    please back up and check that the addresses you gave are in the 
  	    correct format" will be printed if an error occurs while trying to 
  	    put the message together.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net">
       <mt:subject>learning about the mail tag library</mt:subject>
       <mt:message>[body of message]</mt:message>
       <mt:send>
         An error has occurred, please back up and check that the 
         addresses you gave are in the correct format.
       </mt:send>
  </mt:mail> 
  ]]>               
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>Error</name>
        <tag-class>org.apache.taglibs.mailer.ErrorTag</tag-class>
        <tei-class>org.apache.taglibs.mailer.ErrorTEI</tei-class>
        <body-content>JSP</body-content>
        <display-name>error</display-name>
  
        <description>
           Used to get messages explaining errors that occurred in setting any of 
  	 the addresses.
        </description>
        
        <summary>
  	 Used to get messages explaining errors that occurred in setting any of 
  	 the addresses.
        </summary>
        <availability>1.0</availability> 
        <restrictions>Must be nested within send tag.</restrictions>
  
        <variable>
  	<name-from-attribute>id</name-from-attribute>
  	<variable-class>org.apache.taglibs.mailer.ErrorTag</variable-class>
  	<declare>true</declare>
  	<scope>AT_BEGIN</scope>
  	<description>
  	   Name used to retrieve the random string later in the page.
  	</description>
  	<availability>1.0</availability>
  
  	<beanprop>
            <name>error</name>                 
            <get>Yes</get>     
            <set>No</set>      
            <description>
                The current error in the error list as a string.
            </description>
            <availability>1.0</availability>
          </beanprop>
        </variable>	
  
        <attribute>
          <name>id</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
  	     Script variable id for use with standard jsp:getProperty tag.
  	</description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Set text to be displayed if an error occurs when creating the e-mail
  	    message. The message will use the error messages from the tag to be 
  	    more specific as to the errors encountered.
            </comment>
            <code>   
  <![CDATA[      
  <mt:mail to="foo@home.net" from="bar@home.net">
       <mt:subject>learning about the mail tag library</mt:subject>
       <mt:message>[body of message]</mt:message>
       <mt:send>
          The following error(s) have occured: 
        <mt:error id="err">
           <jsp:getProperty name="err" property="error"/>
         </mt:error>
       </mt:send>
  </mt:mail> 
  ]]>               
            </code>
          </usage>
        </example>
  
      </tag>
  
    </tagtoc>
  
  </taglib>
  
  <revision release="Pre Beta" date="07/30/2001">
    <description>
      Clean up of tag library prior to performing a beta
      release, moving toward an official release.  Changing tag library over to 
      the new build.
    </description>
  </revision>
  
  <revision release="Pre Beta" date="05/21/2001">
    <description>
      Support added for sending attachments in the mail.
    </description>
  </revision>
  
  <revision release="Pre Beta" date="03/27/2001">
    <description>
      To, Cc, and Bcc tags changed to a set and add version to allow the addition
      of a single address to an already created list of addresses.  Send and error
      tags added to make it possible for wrongly set addresses to be dealt with by
      the jsp user.
    </description>
  </revision>
  
  <revision release="Pre Beta" date="03/15/2001">
    <description>
      Support added for JNDI lookup of Session and MimePartDataSource objects.
    </description>
  </revision>
  
  <revision release="Pre Beta" date="11/22/2001">
    <description>
      Change to build, and a few changes made to the documentation.
    </description>
  </revision>
         
  <revision release="Development" date="11/21/2000"> 
    <description>
      Initial version of tag library before Jakarta-Taglibs
      had an official release policy for tag libraries.
    </description>
  </revision>
  
  </document>
  
  
  

Mime
View raw message