Sun Java System Application Server Platform Edition 9 Administration Guide

Creating a JavaMail Session

To configure JavaMail for use in Application Server, create a Mail Session in the Application Server Admin Console. This allows server-side components and applications to access JavaMail services with JNDI, using the Session properties you assign for them. When creating a Mail Session, you can designate the mail hosts, transport and store protocols, and the default mail user in the Admin Console so that components that use JavaMail do not have to set these properties. Applications that are heavy email users benefit because the Application Server creates a single Session object and makes it available via JNDI to any component that needs it.

To create a JavaMail session using the Admin Console, select Resources > JavaMail Sessions. Specify the JavaMail settings as follows:

Additionally, define the following Advanced settings only if the mail provider has been re-configured to use a non-default store or transport protocol: