Administer mail resources
JavaMail provides general mail facilities for reading and sending mail. WebSphere Application Server - Express supplies a built-in mail provider that supports three protocol providers: Simple Mail Transfer Protocol (SMTP), Internet Message Access Protocol (IMAP) and Post Office Protocol (POP3). For more information on JavaMail and mail providers, see JavaMail.
You can use the administrative console and wsadmin to administer mail resources.
- Administer mail resources with the administrative console
- Use wsadmin to configure a new mail provider
Administer mail resources with the administrative console
For information on configuring, modifying, and removing mail providers, see these sections:
To configure a new mail provider, follow these steps:
- Start the WebSphere administrative console.
- In the topology tree, expand Resources and click Mail Providers.
- On the Mail Providers page, click New.
- Specify a name for the mail provider.
- Click Apply.
- You can configure these additional properties for the mail provider:
- Protocol Providers
- Mail Sessions
- Save the configuration.
To modify a mail provider, follow these steps:
- Start the WebSphere administrative console.
- In the topology tree, expand Resources and click Mail Providers.
- On the Mail Providers page, click the name of the provider that you want to modify.
- Make your changes.
- Click OK.
- Save the configuration.
To remove a mail provider, follow these steps:
- Start the WebSphere administrative console.
- In the topology tree, expand Resources and click Mail Providers.
- On the Mail Providers page, select the checkbox for the name of the provider that you want to remove.
- Click Delete.
- Save the configuration.
Use wsadmin to configure a new mail provider
On the CL command line, run the STRQSH (Start Qshell) command.
Run the cd command to change to the directory that contains the wsadmin tool:
cd /QIBM/ProdData/WebASE51/ASE/binAt the wsadmin prompt, run this command to identify the parent ID:
set server [$AdminConfig getid /Cell:myCell/Node:myNode/Server:myAppSvr/]where myCell is the name of the cell that contains your application server, myNode is the name of the node that contains your application server, and myAppSvr is the name of your application server.
Run this command to get the required attributes for a mail provider:
$AdminConfig required MailProviderRun this command to set the required attributes:
set name [list name mpname] set mpAttrs [list $name]where mpname is the name of the mail provider that you want to create.Run this command to create the mail provider:
set newmp [$AdminConfig create MailProvider $server $mpAttrs]Run this command to save your changes:
$AdminConfig save