Class MailSessionFactory

All Implemented Interfaces:

public class MailSessionFactory extends Object implements ObjectFactory

Factory class that creates a JNDI named JavaMail Session factory, which can be used for managing inbound and outbound electronic mail messages via JavaMail APIs. All messaging environment properties described in the JavaMail Specification may be passed to the Session factory; however the following properties are the most commonly used:

  • - Hostname for outbound transport connections. Defaults to localhost if not specified.

This factory can be configured in a <Context> element in your conf/server.xml configuration file. An example of factory configuration is:

 <Resource name="mail/smtp" auth="CONTAINER"
 <ResourceParams name="mail/smtp">
Craig R. McClanahan