WAS v8.5 > Administer applications and their environment > Welcome to administering Mail, URLs, and other Java EE resourcesConfigure mail providers and sessions
Configure our own mail providers and sessions to customize how mail is handled in the application server. A mail provider encapsulates a collection of protocol providers, like SMTP, IMAP and POP3, and others. Mail sessions authenticate users and control access to messaging systems.
The application server includes a default mail provider that is called the built-in provider. If we use the default mail provider, you only have to configure the mail session.
To use a customized mail provider, create the mail session and provider.
- Create the mail session.
- In the dmgr console, click Resources > Mail > Mail sessions.
- Select the scope for the new mail session.
- Click New.
- Type the mail session name in the Name field.
- Type the JNDI name in the JNDI Name field.
- Optional: Enable strict Internet address parsing. This option specifies whether the recipient addresses must be parsed in strict compliance with RFC 822, which is a specifications document that is issued by the Internet Architecture Board. This setting is not generally used for most mail applications, and by default this setting is not enabled.
RFC 822 syntax for parsing addresses effectively enforces a strict definition of a valid email address. If you select this setting, your mail component adheres to RFC 822 syntax and rejects recipient addresses that do not parse into valid email addresses as defined by the specification. If we do not select this setting, your mail component does not adhere to RFC 822 syntax and accepts recipient addresses that do not comply with the specification. We can view the RFC 822 specification at the website for the World Wide Web Consortium.
- Optional: Enable debug mode. Select this option to print interaction between the mail application and the mail servers and the properties of this mail session to the SystemOut.log file.
IBM recommends using the HPEL log and trace infrastructure. With HPEL, one views logs using the LogViewer command-line tool in PROFILE/bin.
- Provide information for the incoming mail service, outgoing service, or both. Enter the following information in the fields provided:
- Server
- Protocol
- User
- Password
- Return email address. This field is available for outgoing mail properties.
- Click Apply or OK.
- Create the mail provider, and optionally define one or more protocol providers. In the dmgr console, click Resources > Mail > Mail Providers.
- Select the scope for the new mail provider.
- Click New.
- Type the name of the mail provider in the name field.
- Optional: Isolate the mail provider.
We can isolate a mail provider to allow different versions of the same provider to be loaded in the same Java Virtual Machine (JVM). For example, you might want to deploy multiple applications on a single server, but each application requires different versions or implementations of the mail provider. We can isolate each version or implementation of the provider, and the provider is loaded in its own class loader and does not interfere with other implementations. There are some general considerations for isolating any type of resource provider; refer to the topic on considerations for isolated resource providers for more information.
- Select Isolate this mail provider.
- Give the mail provider a unique class path that is appropriate for that version or implementation.
- Click Apply or OK.
- Define one or more protocol providers for the mail provider.
- Click mail_provider.
- Click Protocol Providers.
- Click New.
- Type the protocol name in the Protocol field.
- Type the class name in the Class name field.
- Select the type of mail server that this protocol provider supports. Select TRANSPORT or STORE. TRANSPORT corresponds to outgoing mail services, and STORE corresponds to incoming mail services.
- Click Apply or OK.
Ensure that every mail session is defined under a parent mail provider. Select a mail provider first and then create your mail session.
- Optional: Configure the mail session.
- Click mail_provider.
- Click Mail Sessions.
- Click mail_session.
- Make changes to appropriate fields.
- Click Apply or OK.
If the application has a client, we can configure mail providers and sessions using the Application Client Resource Configuration Tool.
Subtopics
- Mail provider page
Use this page to view available JavaMail service providers, also known as mail providers. The mail provider encapsulates a collection of protocol providers, which implement the protocols for communication between your mail application and mail servers.- Mail provider settings
Use this page to edit mail provider properties or configure a new mail provider. The mail provider encapsulates a collection of protocol providers, which implement the protocols for communication between your mail application and mail servers.- Protocol providers page
Use this page to select or add a protocol provider that supports interaction between your mail application and mail servers. For example, the application might require the Simple Mail Transfer Protocol (SMTP), which is a popular transport protocol for sending mail. Selecting that protocol provider allows your mail application to connect and send mail through the server.- Protocol providers settings
Use this page to set properties of a protocol provider, including SMTP, IMAP and POP3, which provides the implementation class for a specific protocol to support communication between your mail application and mail servers.- Mail session page
Use this page to view mail sessions that are defined under the parent mail provider.- Mail session configuration settings
Use this page to configure mail sessions.- JavaMail system properties
Use this information to set custom JVM system properties that provide additional character encoding options for the JavaMail implementation.- Mail provider page
Use this page to view available JavaMail service providers, also known as mail providers. The mail provider encapsulates a collection of protocol providers, which implement the protocols for communication between your mail application and mail servers.- Mail provider settings
Use this page to edit mail provider properties or configure a new mail provider. The mail provider encapsulates a collection of protocol providers, which implement the protocols for communication between your mail application and mail servers.- Protocol providers page
Use this page to select or add a protocol provider that supports interaction between your mail application and mail servers. For example, the application might require the Simple Mail Transfer Protocol (SMTP), which is a popular transport protocol for sending mail. Selecting that protocol provider allows your mail application to connect and send mail through the server.- Protocol providers settings
Use this page to set properties of a protocol provider, including SMTP, IMAP and POP3, which provides the implementation class for a specific protocol to support communication between your mail application and mail servers.- Mail session page
Use this page to view mail sessions that are defined under the parent mail provider.- Mail session configuration settings
Use this page to configure mail sessions.- JavaMail system properties
Use this information to set custom JVM system properties that provide additional character encoding options for the JavaMail implementation.
Related
Troubleshoot applications with HPEL
Configure new mail sessions for application clients
Configure mail providers and sessions for application clients
Reference:
Considerations for isolated resource providers
Related information:
World Wide Web Consortium: RFC 882 specifications