Sun Java System Web Server 7.0 Administrator's Guide

Configuring Mail Resources

JMS destinations are Java EE resources that can be created and managed via Sun Java System Web Server.

Many internet applications require the ability to send email notifications, so the Java EE platform includes the JavaMail API along with a JavaMail service provider that allows an application component to send internet mail.

ProcedureTo Add a Mail Resource

  1. Select the Configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list.

  2. Click on Java > Resources tab.

  3. Click on New button under Mail Resource section.

Properties for Mail Resource

The following table describes the properties available while adding a new mail resource.

Table 11–5 Mail Resource Properties

Property

Description

JNDI Name

Provide a unique name for the new mail resource. 

Enabled

Determines if this mail resource is enabled at runtime. 

User

Valid user name registered in the mail server. 

From

Email address from which the server sends mail. 

Host

Host name/IP address of the mail server. 

Store Protocol

Protocol used to retrieve messages. 

Store Protocol Class

Storage service provider implementation for store-protocol. Fully qualified class name of a class that implements store-protocol. The default class is com.sun.mail.imap.IMAPStore.

Transport Protocol

Protocol used to send messages. 

Transport Protocol Class

Transport service provider implementation for transport-protocol. Fully qualified class name of a class that implements transport-protocol. The default class is com.sun.mail.smtp.SMTPTransport.


Note –

Using CLI

For creating a mail resource, execute the following command:


wadm> create-mail-resource --config=test --server-host=localhost 
--mail-user=nobody --from=xyz@foo.com mail/Session

See CLI Reference, create-mail-resource(1).