Tocreate a JavaMail session using the Admin Console, select Resources —> JavaMail Sessions.
Specifythe JavaMail settings as follows:
JNDIName: The unique name for the mail session. Use the naming sub-context prex mail/
forJavaMail resources. For example: mail/MySession.
MailHost: The host name of the default mail server. The connect methods of the Store and
Transportobjects use this value if a protocol-specic host property is not supplied. The
namemust be resolvable to an actual host name.
DefaultUser: The user name to provide when connecting to a mail server. The connect
methodsof the Store and Transport objects use this value if a protocol-specic username
propertyis not supplied.
DefaultReturn 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,dene the following Advanced settings only if the mail provider has been
re-conguredto use a non-default store or transport protocol:
StoreProtocol: Denes the Store object communication method to be used. By default, the
StoreProtocol is imap.
StoreProtocol Class: Provides the Store communication method class that implements the
desiredStore protocol. By default, the Store Protocol Class is
com.sun.mail.imap.IMAPStore.
TransportProtocol: Identies the transport communication method. By default, the
TransportProtocol is smtp.
TransportProtocol Class: Denes 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,
forthis mail session. If the JavaMail log level is set to FINE or ner, the debugging output is
generatedand is included in the system log le.
AdditionalProperties: Create properties required by applications, such as a
protocol-specichost or username property. Ensure that every property name you dene
startwith a mail- prex. If the name of the property does not start withmail-, the property
isignored.
CreatingaJavaMail Session
SunGlassFishEnterprise Ser ver2.1 Administration Guide • December 200876