The Apache Mailet API is a Java API which allows the rapid development and flexible deployment of email processing functionality.
The Mailet API is a subproject of Apache James. All who are interested in developing the Mailet API and James will be warmly welcomed on the mailing lists.
A mailet is a mail processing component. Though there are some differences, a servlet as a HTTP processing component is a useful analogy.
Mailets implement Mailet. Mailets execute within a mailet container. James server is a well known mailet container. Assembly and configuration of mailets and mail processors is the responsibility of the particular container.
Mailets have a simple lifecycle managed by the mailet container:
init(
MailetConfig
config)
passes environmental information. Any setup necessary should be performed now.
service(
Mail
mail)
is called repeatedly. Note that this method may be called concurrently.
destroy()
is called when the mailet is taken out of service.
MailetConfig
gives access to simple parametrization.
getInitParameter
allows configuration parameters to be passed from the mailet container.
How these parameters are set by the user of the mailet is the responsibility of the container.
More sophisticated configuration and assembly (for example, allowing access to services) is also
the responsibility of the container.
MailetConfig allows communication with the container by calling getMailetContext(). See MailetContext for more details.
The Basic Mailet Toolkit collects lightweight frameworks and utilities likely to be useful for general mailet developers.
See Standard mailets.
The build uses Ant.
ant -projecthelp
describes appropriate targets.
ant
runs the default target.
Please direct your feedback to the mailet-api mailing list.