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

For information on configuring, modifying, and removing mail providers, see these sections:

Configure mail providers

To configure a new mail provider, follow these steps:

  1. Start the WebSphere administrative console.

  2. In the topology tree, expand Resources and click Mail Providers.

  3. On the Mail Providers page, click New.

  4. Specify a name for the mail provider.

  5. Click Apply.

  6. You can configure these additional properties for the mail provider:

    • Protocol Providers

    • Mail Sessions

  7. Save the configuration.

Modify mail resources

To modify a mail provider, follow these steps:

  1. Start the WebSphere administrative console.

  2. In the topology tree, expand Resources and click Mail Providers.

  3. On the Mail Providers page, click the name of the provider that you want to modify.

  4. Make your changes.

  5. Click OK.

  6. Save the configuration.

Remove mail providers

To remove a mail provider, follow these steps:

  1. Start the WebSphere administrative console.

  2. In the topology tree, expand Resources and click Mail Providers.

  3. On the Mail Providers page, select the checkbox for the name of the provider that you want to remove.

  4. Click Delete.

  5. 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/bin

    Start wsadmin.

    At 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 MailProvider

    Run 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