Configure a JavaMail session using the administrative console
The WebSphere administrative console is used to configure a JavaMail session for a servlet or JavaServer Pages (JSP).
To configure a JavaMail session using the administrative console, perform these steps:
- Open the WebSphere Application Server administrative console. For more information, see Start the WebSphere administrative console in the Administration topic.
- In the topology tree, expand Resources, and click Mail Providers.
- Select the Server radio button, and click Apply.
- Click Built-in Mail Provider.
- Click Mail Sessions, and click New to create a new Mail Session.
- Fill in these 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. For more information, see Start and test your application server in the Administration topic.