To create a JavaMail session using the Admin Console, select Resources —> JavaMail Sessions.
Specify the JavaMail settings as follows:
■
JNDI Name: The unique name for the mail session. Use the naming sub-context prex mail/
for JavaMail resources. For example: mail/MySession.
■
Mail Host: The host name of the default mail server. The connect methods of the Store and
Transport objects use this value if a protocol-specic host property is not supplied. The
name must be resolvable to an actual host name.
■
Default User: The user name to provide when connecting to a mail server. The connect
methods of the Store and Transport objects use this value if a protocol-specic username
property is not supplied.
■
Default Return Address: The email address of the default user, in the form:
username@host.domain.
■
Description: Provide a descriptive statement for the component.
■
Session: Deselect the Enabled checkbox if you do not want to enable the mail session at this
time.
Additionally, dene the following Advanced settings only if the mail provider has been
re-congured to use a non-default store or transport protocol:
■
Store Protocol: Denes the Store object communication method to be used. By default, the
Store Protocol is imap.
■
Store Protocol Class: Provides the Store communication method class that implements the
desired Store protocol. By default, the Store Protocol Class is
com.sun.mail.imap.IMAPStore.
■
Transport Protocol: Identies the transport communication method. By default, the
Transport Protocol is smtp.
■
Transport Protocol Class: Denes the communication method for the transport class. By
default, the Transport Protocol Class is com.sun.mail.smtp.SMTPTransport.
■
Debug: Select this checkbox to enable extra debugging output, including a protocol trace,
for this mail session. If the JavaMail log level is set to FINE or ner, the debugging output is
generated and is included in the system log le.
■
Additional Properties: Create properties required by applications, such as a
protocol-specic host or username property. Ensure that every property name you dene
start with a mail- prex. If the name of the property does not start withmail-, the property
is ignored.
CreatingaJavaMailSession
SunGlassFishEnterpriseServer2.1AdministrationGuide • December200876