Sun Java System Application Server Platform Edition 8.2 Administration Guide

ProcedureTo create a JavaMail session

  1. In the tree component, expand the Resources node, then select the JavaMail Sessions node.

  2. On the JavaMail Sessions page, click New.

    The Create JavaMail Session page appears.

  3. In the JNDI Name field, type the name of the session.

    It is a recommended practice to use the naming subcontext prefix mail/ for JavaMail resources. For example: mail/MySession.

  4. In the Mail Host field, type 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.

  5. In the Default User field, type 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.

  6. In the Default Return Address field, type the email address of the default user, in the form username@host. domain.

  7. Deselect the Enabled checkbox if you do not want to enable the mail session at this time.

  8. In the Advanced area, change the field values only if the Application Server’s mail provider has been reconfigured to use a non-default store or transport protocol.

    By default, the Store Protocol is imap; the Store Protocol Class is com.sun.mail.imap.IMAPStore; the Transport Protocol is smtp; and the Transport Protocol Class is com.sun.mail.smtp.SMTPTransport.

  9. Select the Debug checkbox to enable extra debugging output, including a protocol trace, for this mail session.

    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.

  10. In the Additional Properties area, click Add Property to add properties required by applications, such as a protocol-specific host or username property.

    The JavaMail API documentation lists the available properties http://java.sun.com/products/javamail/javadocs/index.html).

  11. Click OK to save the session.

Equivalent asadmin command

create-javamail-resource