You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by ca...@apache.org on 2001/05/21 20:30:08 UTC
cvs commit: jakarta-taglibs/mailer/doc/web index.html
catlett 01/05/21 11:30:08
Modified: mailer/doc/web index.html
Log:
documentation reflects new attach tag
Revision Changes Path
1.3 +338 -171 jakarta-taglibs/mailer/doc/web/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-taglibs/mailer/doc/web/index.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- index.html 2001/04/13 22:41:48 1.2
+++ index.html 2001/05/21 18:30:03 1.3
@@ -180,6 +180,10 @@
<TD>Used to set the subject of the message.</TD>
</TR>
<TR>
+<TD><A HREF="#attach">attach</A></TD>
+<TD>Used to add an attachment to an e-mail message..</TD>
+</TR>
+<TR>
<TD><A HREF="#send">send</A></TD>
<TD>Used to send the message.</TD>
</TR>
@@ -205,6 +209,195 @@
</TR>
<TR>
<TD WIDTH="2%"> </TD>
+<TD WIDTH="98%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="20%"><B>Tag Body</B></TD>
+ <TD WIDTH="80%">JSP</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Script Variable</B></TD>
+ <TD WIDTH="80%">No</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Restrictions</B></TD>
+ <TD WIDTH="80%">None</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><b>Attributes</b></TD>
+ <TD WIDTH="80%"> </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"> </TD>
+ <TD WIDTH="80%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD width="40%">Name</TD>
+ <TD width="20%">Required</TD>
+ <TD width="40%">Runtime Expression Evaluation</td>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> authentication</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">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.</TD>
+ </TR>
+ <tr>
+ <td colspan="3"> </td>
+ </tr>
+ <tr>
+ <td colspan="3">If none of the following three attributes is given
+ the tag will default to using localhost as the SMTP host. </td>
+ </tr>
+ <tr>
+ <td colspan="3"> </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <table border="0" width="100%">
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> server</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">This attribute allows you to set the SMTP
+ host if it is going to be other than localhost.</td>
+ </tr>
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> session</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">This attribute allows a message to be created
+ using a predefined, JNDI named Session object. </td>
+ </tr>
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> mimeMessage</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">This attribute allows a message to be created
+ using a predefined, JNDI named MimePartDataSource. </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3"> </td>
+ </tr>
+ <tr>
+ <td colspan="3">The following attributes can be set either as
+ attributes in the mail tag, or by the corresponding tags within
+ the body of the mail tag. </td>
+ </tr>
+ <tr>
+ <td colspan="3"> </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <table border="0" width="100%">
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> to</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">The To address of the e-mail. Accepts a
+ comma separated list of addresses.</td>
+ </tr>
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> replyTo</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">The Reply-To address of the e-mail. Accepts
+ a comma separated list of addresses.</td>
+ </tr>
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> from</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">The From address of the e-mail. </td>
+ </tr>
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> cc</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">The Carbon Copy address of the e-mail. Accepts
+ a comma separated list of addresses. </td>
+ </tr>
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> bcc</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">The Blind Carbon Copy address of the e-mail.
+ Accepts a comma separated list of addresses. </td>
+ </tr>
+ <tr bgcolor="#CCCCCC">
+ <td width="40%"><b> subject</b></td>
+ <td width="20%"> No</td>
+ <td width="40%"> No</td>
+ </tr>
+ <tr>
+ <td colspan="3">The Subject of the e-mail. </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><b>Properties</b></TD>
+ <TD WIDTH="80%">None</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%" VALIGN="TOP"><b>Example</b></TD>
+ <TD WIDTH="80%"><br>
+ <pre>
+<!-- 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. -->
+<mt:mail to="foo@home.net" from="bar@home.net"subject="mail taglib">
+ <mt:message>[<i>body of message</i>]</mt:message>
+ <mt:send/>
+</mt:mail>
+ </TD>
+ </TR>
+ </TABLE>
+
+<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
+<TR>
+<TD COLSPAN="2">
+<TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
+<TR>
+<TD><B><FONT SIZE="+1"><A NAME="message"> message</A></FONT></B></TD>
+<TD ALIGN="RIGHT">Availability: version 1.0 </TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD COLSPAN="2">Used to set the body of the message.<BR>Message will appear as it is written, any carriage returns and spaces in the JSP will be present in the delivered message.</TD>
+</TR>
+<TR>
+<TD WIDTH="2%"> </TD>
<TD WIDTH="98%"> <TABLE BORDER="0" WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>Tag Body</B></TD>
@@ -216,7 +409,8 @@
</TR>
<TR>
<TD WIDTH="20%"><B>Restrictions</B></TD>
-<TD WIDTH="80%">None</TD>
+<TD WIDTH="80%">Must be nested within a mail tag.<BR>Must occur before the send tag.
+</TD>
</TR>
<TR>
<TD WIDTH="20%"><B>Attributes</B></TD>
@@ -245,114 +439,6 @@
</TD>
</TR>
<TR>
-<TD WIDTH="20%" COLSPAN="2"> </TD>
-</TR>
-<TR>
-<TD WIDTH="20%" COLSPAN="2"><BLOCKQUOTE>If none of the following three attributes
-is given the tag will default to using localhost as the SMTP host.</BLOCKQUOTE>
-</TD>
-</TR>
-<TR>
-<TD WIDTH="20%"> </TD>
-<TD WIDTH="80%"> <TABLE BORDER="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> server</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">This attribute allows you to set the SMTP host if it is going to
-be other than localhost.</TD>
-</TR>
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> session</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">This attribute allows a message to be created using a
-predefined, JNDI named Session object. </TD>
-</TR>
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> mimeMessage</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">This attribute allows a message to be created using a
-predefined, JNDI named MimePartDataSource. </TD>
-</TR>
-</TABLE>
-</TD>
-</TR>
-<TR>
-<TD WIDTH="20%" COLSPAN="2"> </TD>
-</TR>
-<TR>
-<TD WIDTH="20%" COLSPAN="2"><BLOCKQUOTE>The following attributes can be set
-either as attributes in the mail tag, or by the corresponding tags within the
-body of the mail tag.</BLOCKQUOTE>
-</TD>
-</TR>
-<TR>
-<TD WIDTH="20%"> </TD>
-<TD WIDTH="80%"> <TABLE BORDER="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> to</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">The To address of the e-mail. Accepts a comma separated list of
-addresses.</TD>
-</TR>
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> replyTo</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">The Reply-To address of the e-mail. Accepts a comma separated list
-of addresses.</TD>
-</TR>
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> from</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">The From address of the e-mail. </TD>
-</TR>
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> cc</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">The Carbon Copy address of the e-mail. Accepts a comma separated
-list of addresses. </TD>
-</TR>
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> bcc</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">The Blind Carbon Copy address of the e-mail. Accepts a comma
-separated list of addresses. </TD>
-</TR>
-<TR BGCOLOR="#CCCCCC">
-<TD WIDTH="40%"><B> subject</B></TD>
-<TD WIDTH="20%"> No</TD>
-<TD WIDTH="40%"> No</TD>
-</TR>
-<TR>
-<TD COLSPAN="3">The Subject of the e-mail. </TD>
-</TR>
-</TABLE>
-</TD>
-</TR>
-<TR>
<TD WIDTH="20%"><B>Properties</B></TD>
<TD WIDTH="80%">None</TD>
</TR>
@@ -361,73 +447,19 @@
<TD WIDTH="80%"><BR>
<PRE>
<!-- 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. -->
-<mt:mail to="foo@home.net" from="bar@home.net"subject="mail taglib">
- <mt:message>[<I>body of message</I>]</mt:message>
+<!-- The type attribute is not used in the message tag, it defaults -->
+<!-- to text -->
+<mt:mail 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>
<!-- Send the same message only this time HTML tags are included in -->
<!-- the body of the message for formatting. -->
-<mt:mail to="foo@home.net" from="bar@home.net"
-subject="mail taglib" type="html">
- <mt:message>[<I>body of message containing html formatting</I>]</mt:message>
- <mt:send/>
-</mt:mail>
-</PRE>
-
-</TD>
-</TR>
-</TABLE>
-</TD>
-</TR>
-</TABLE>
-
-<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
-<TR>
-<TD COLSPAN="2">
-<TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
-<TR>
-<TD><B><FONT SIZE="+1"><A NAME="message"> message</A></FONT></B></TD>
-<TD ALIGN="RIGHT">Availability: version 1.0 </TD>
-</TR>
-</TABLE>
-</TD>
-</TR>
-<TR>
-<TD COLSPAN="2">Used to set the body of the message.<BR>Message will appear as it is written, any carriage returns and spaces in the JSP will be present in the delivered message.</TD>
-</TR>
-<TR>
-<TD WIDTH="2%"> </TD>
-<TD WIDTH="98%"> <TABLE BORDER="0" WIDTH="100%">
-<TR>
-<TD WIDTH="20%"><B>Tag Body</B></TD>
-<TD WIDTH="80%">JSP</TD>
-</TR>
-<TR>
-<TD WIDTH="20%"><B>Script Variable</B></TD>
-<TD WIDTH="80%">No</TD>
-</TR>
-<TR>
-<TD WIDTH="20%"><B>Restrictions</B></TD>
-<TD WIDTH="80%">Must be nested within a mail tag.<BR>Must occur before the send tag.
-</TD>
-</TR>
-<TR>
-<TD WIDTH="20%"><B>Attributes</B></TD>
-<TD WIDTH="80%">None</TD>
-</TR>
-<TR>
-<TD WIDTH="20%"><B>Properties</B></TD>
-<TD WIDTH="80%">None</TD>
-</TR>
-<TR>
-<TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
-<TD WIDTH="80%"><BR>
-<PRE>
<mt:mail to="foo@home.net" from="bar@home.net" subject="mail taglib">
- <mt:message><I>[body of message]</I></mt:message>
+ <mt:message type="html">
+ [<I>body of message containing html formatting</I>]
+ </mt:message>
<mt:send/>
</mt:mail>
</PRE>
@@ -1043,6 +1075,141 @@
<TD COLSPAN="2">
<TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
<TR>
+<TD><B><FONT SIZE="+1"><A NAME="attach"> attach</A></FONT></B></TD>
+<TD ALIGN="RIGHT">Availability: version 1.0 </TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD COLSPAN="2">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.
+</TD>
+</TR>
+<TR>
+<TD WIDTH="2%"> </TD>
+<TD WIDTH="98%"> <TABLE BORDER="0" WIDTH="100%">
+<TR>
+<TD WIDTH="20%"><B>Tag Body</B></TD>
+<TD WIDTH="80%">JSP</TD>
+</TR>
+<TR>
+<TD WIDTH="20%"><B>Script Variable</B></TD>
+<TD WIDTH="80%">No</TD>
+</TR>
+<TR>
+<TD WIDTH="20%"><B>Restrictions</B></TD>
+<TD WIDTH="80%">Must be nested within a mail tag.<BR>Must occur before the send tag.
+</TD>
+</TR>
+<TR>
+<TD WIDTH="20%"><B>Attributes</B></TD>
+<TD WIDTH="80%"></TD>
+</TR>
+<TR>
+<TD WIDTH="20%"> </TD>
+<TD WIDTH="80%">
+<TABLE BORDER="0" WIDTH="100%">
+<TR>
+<TD WIDTH="40%">Name</TD>
+<TD WIDTH="20%">Required</TD>
+<TD WIDTH="40%">Runtime Expression Evaluation</TD>
+</TR>
+<TR BGCOLOR="#CCCCCC">
+<TD WIDTH="40%"><B> file</B></TD>
+<TD WIDTH="20%"> No</TD>
+<TD WIDTH="40%"> No</TD>
+</TR>
+<TR>
+<TD COLSPAN="3">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.</TD>
+</TR>
+<TR BGCOLOR="#CCCCCC">
+<TD WIDTH="40%"><B> url</B></TD>
+<TD WIDTH="20%"> No</TD>
+<TD WIDTH="40%"> No</TD>
+</TR>
+<TR>
+<TD COLSPAN="3">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.
+</TD>
+</TR>
+<TR BGCOLOR="#CCCCCC">
+<TD WIDTH="40%"><B> type</B></TD>
+<TD WIDTH="20%"> No</TD>
+<TD WIDTH="40%"> No</TD>
+</TR>
+<TR>
+<TD COLSPAN="3">The mime type of the attachment that is included within the body
+ of the attach tag..</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD WIDTH="20%"><B>Properties</B></TD>
+<TD WIDTH="80%">None</TD>
+</TR>
+<TR>
+<TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
+<TD WIDTH="80%"><BR>
+<PRE>
+<!-- Add the file mail/duck.gif as an attachment -->
+<!-- in the e-mail started with the <mt:mail> tag. -->
+<BR>
+<mt:mail to="foo@home.net" from="bar@home.net" subject="test">
+ <mt:message><I>[body of message]</I></mt:message>
+ <mt:attach file="mail/duck.gif"/>
+ <mt:send/>
+</mt:mail>
+<BR>
+<!-- Add the resource named by the following url -->
+<!-- http://www.someplace.com/stuff.html as an attachment -->
+<!-- in the e-mail started with the <mt:mail> tag. -->
+<!-- Name the url in the body of the attach tag. -->
+<BR>
+<mt:mail to="foo@home.net" from="bar@home.net" subject="test">
+ <mt:message><I>[body of message]</I></mt:message>
+ <mt:attach url="">
+ http://www.someplace.com/stuff.html
+ </mt:attach>
+ <mt:send/>
+</mt:mail>
+<BR>
+<!-- Add the body of the attach tag as an attachment. When the -->
+<!-- message comes "This is just a test" will be formatted with -->
+<!-- the <h1> tags. -->
+<BR>
+<mt:mail to="foo@home.net" from="bar@home.net" subject="test">
+ <mt:message><I>[body of message]</I></mt:message>
+ <mt:attach type="text/html">
+ <h1>This is just a test</h1>
+ </mt:attach>
+ <mt:send/>
+</mt:mail>
+</PRE>
+
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+
+<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
+<TR>
+<TD COLSPAN="2">
+<TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
+<TR>
<TD><B><FONT SIZE="+1"><A NAME="subject"> subject</A></FONT></B></TD>
<TD ALIGN="RIGHT">Availability: version 1.0 </TD>
</TR>
@@ -1270,6 +1437,6 @@
<H3><A NAME="history">Revision History</A></H3>
<P>Review the complete <A HREF="changes.html">revision history</A> of this tag
library.</P>
-</BODY>
+</table></BODY>
</HTML>