Use the New JavaMail Session page to create a JavaMail session resource.
The New JavaMail Session page contains the following options.
A unique name that identifies the mail session. Use the naming sub-context prefix mail/
for JavaMail resources. For example: mail/MySession
. The name must contain only alphanumeric, underscore, dash, or dot characters.
The host name of the default mail server. The connect methods of the Store and Transport objects use this value if a protocol-specific host property is not supplied. The name must be resolvable to an actual host name.
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-specific username property is not supplied. The user name must contain only alphanumeric, underscore, dash, or dot characters.
The e-mail address of the default user. The format is username@
host.domain.
A description of this mail session.
The status of the mail session. The mail session can be enabled or disabled. The default value is Enabled.
The storage protocol service, which connects to a mail server, retrieves messages, and saves messages in one or more folders. Allowed values are imap
, pop3
, imaps
, and pop3s
. The default value is imap
.
The service provider implementation class for storage. Allowed values are:
com.sun.mail.imap.IMAPStore
com.sun.mail.pop3.POP3Store
com.sun.mail.imap.IMAPSSLStore
com.sun.mail.pop3.POP3SSLStore
The default value is com.sun.mail.imap.IMAPStore
.
The transport protocol service, which sends messages. Allowed values are smtp
and smtps
. The default value is smtp
.
The service provider implementation class for transport. Allowed values are:
com.sun.mail.smtp.SMTPTransport
com.sun.mail.smtp.SMTPSSLTransport
The default value is com.sun.mail.smtp.SMTPTransport
.
If this option is selected, debugging for this resource is enabled. If the JavaMail log level is set to FINE
or finer, the debugging output is generated and is included in the system log file. See To Configure Log Levels for information about setting the log level.
Additional properties for the JavaMail session. For a list of the available properties, see the JavaMail API documentation (http://java.sun.com/products/javamail/javadocs/index.html
). Additional properties must begin with mail-
and must use hyphens, not periods, as separators. For example, mail-debug
is correct, but mail.debug
is not. The GlassFish Server back end converts the hyphens into the periods expected by the JavaMail API.
Clusters and standalone instances for the JavaMail session. Move desired targets to the Selected Targets column using the Add and Add All buttons. Move any unneeded targets to the Available Targets column using the Remove and Remove All buttons.
This option is displayed only if clusters or standalone instances have been created in the domain.