Configure a JavaMail session using the administrative console
The WAS administrative console is used to configure a JavaMail session for a servlet, JavaService Pages (JSP), or enterprise bean as the client, or user, of the API.
To configure a JavaMail session using the administrative console, perform the following steps:
Open the WAS administrative console. To start the console, open this URL in your browser:
http://your.server.name:port/adminwhere your.server.name is the hostname of your iSeries server and port is your administrative port number. See The administrative console topic for more information.
- In the topology tree, expand Resources, and click Mail Providers.
- Click Built-in Mail Provider.
- Click Mail Sessions, and click New to create a new Mail Session.
- Fill in the following fields:
- Name
This is a required field.- JNDI Name
This is a required field. It specifies the Java Naming and Directory Interface (JNDI) name for the resource, including any naming subcontexts.- Mail Transport Host
This is a required field. Enter a value such as yourcompany.com.- Mail From
This is a required field. Enter a value such as userid@yourcompany.com.
- Click OK.
- Click Save on the toolbar to save the configuration.
- Click Save again to update the master repository with your changes.
Restart your application server instance.
- Enter the Start Qshell (STRQSH) command on an OS/400 command line.
On the Qshell command line, enter this command:
stopServer -instance yourInstance serverNamewhere yourInstance is the name of the instance you want to stop and serverName is the name of the server you want stop.
On the Qshell command line, enter this command:
startServer -instance yourInstance serverNamewhere yourInstance is the name of the instance you want to start and serverName is the name of the server you want start.
See Mail session settings
for more information.