README file for Mailer Taglib 2.0

Last update: 2004-05-17



INTRODUCTION

This is the README file for Mailer Taglib 2.0

The Mailer Taglib 2.0 is a JSP 2.0 tag library that is a complete rewrite
of the existing Mailer Taglib 1.1 which can be found at
http://jakarta.apache.org/taglibs/mailer. It allows a JSP
developer to send e-mail messages from a JSP file.

There are two versions of this tag library:
- mailer2.jar for JSP 2.0 containers
- mailer2_12.jar for JSP 1.2 containers


FEATURES

This library has the following features:
- Send simple plain text e-mails
- Attach local (file) or external (url) attachments to a message
- Create HTML formatted messages
- Create multipart/alternative HTML and plain text messages
- Save messages in a scope for later use
- Send messages in a background thread for better response times, or directly
  to get better feedback
- Use JSTL 1.1 EL to easily add recipients, and set many other attributes.
- Store messages and load previously stored messages
- Encrypt and/or sign mail messages using BouncyCastle's SMIME.


REQUIREMENTS

For both versions:
- J2SE 1.4 as this library depends on java.util.logging.
- An SMTP server in your network.
- The following JAR files from a J2EE 1.4 distribution:
  - activation.jar
  - mail.jar

Additionally, if you want to encrypt and/or sign mail messages:
- bcprov-jdkX-Y.jar and bcmail-jdkX-Y.jar from the Legion of the Bouncy Castle
  (http://www.bouncycastle.org), where X is the version of your JDK, and Y
  is the Bouncy Castle version number
  
Additionally, for mailer2.jar (the JSP 2.0 version):
- A JSP 2.0 application server, like Tomcat 5.x or Resin 3.x. This tag
  library does not work with a JSP 1.2 application server, like Tomcat 4.x
  or Resin 2.x. See the 1.2 version instead.

Additionally, for mailer2_12.jar (the JSP 1.2 version):
- A JSP 1.2 application server, like Tomcat 4.x or Resin 2.x.
- The following JAR file from JSTL 1.0.x:
  - standard.jar
- To build this library the following JAR file from Xerces 2.6.x:
  - xercesImpl.jar


DEPLOYING

- Copy the JAR file mailer2.jar to your web application's WEB-INF/lib.
- Copy the JAR files activation.jar and mail.jar from a J2EE 1.4
  distribution to WEB-INF/lib.
- Copy the JAR file standard.jar from JSTL 1.0.x to WEB-INF/lib if you are using
  a JSP 1.2 container.
- Copy the JAR files bcprov-jdkX-Y.jar and bcmail-jdkX-Y.jar files from Bouncy
  Castle to WEB-INF/lib if you want to use signing or encrypting.
- Add the following taglib declaration to your JSP files:

  <%@ taglib prefix="mt" uri="http://jakarta.apache.org/taglibs/mailer-2.0" %>

- Either specify the server attribute of the mt:mail tag, or specify the
  org.apache.taglibs.mailer2.server context-param in your application's web.xml.
- Consult the examples or the Javadoc on typical usages of this library.


DEPLOYING THE EXAMPLES

- Copy build.properties.sample to build.properties
- Adjust the location of required JAR files in the build.properties file
- To generate the 2.0 examples, run: ant war and deploy the generated mailer2.jar
  in your 2.0 application server
- Or, to generate the 1.2 examples, run: ant war12 and deploy mailer2_12.jar in
  your 1.2 application server 


COMPILING

Compiling this tag library requires a current version of Ant (http://ant.apache.org).

- Copy build.properties.sample to build.properties
- Adjust the location of required and/or optional JAR files in the build.properties file
- To generate the 2.0 version, run: ant all
- To generate the 1.2 version, run: ant generate12

Have fun,


Jeroen van Vianen
jeroen dot van dot vianen at satama dot com