Configuring mail providers and sessions

Configure your 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.

About this task

The application server includes a default mail provider that is called the built-in provider. If you use the default mail provider, you only have to configure the mail session.

To use a customized mail provider, you must create the mail session and provider.

Procedure

  • Create the mail session.
    1. In the administrative console, click Resources > Mail > Mail sessions.
    2. Select the scope for the new mail session.
    3. Click New.
    4. Type the mail session name in the Name field.
    5. Type the JNDI name in the JNDI Name field.
    6. 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 you 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. You can view the RFC 822 specification at the website for the World Wide Web Consortium.

    7. 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.
      Note: This topic references one or more of the application server log files. As a recommended alternative, you can configure the server to use the High Performance Extensible Logging (HPEL) log and trace infrastructure instead of using SystemOut.log , SystemErr.log, trace.log, and activity.log files on distributed and IBM® i systems. You can also use HPEL in conjunction with your native z/OS® logging facilities. If you are using HPEL, you can access all of your log and trace information using the LogViewer command-line tool from your server profile bin directory. See the information about using HPEL to troubleshoot applications for more information on using HPEL.
    8. Provide information for the incoming mail service, outgoing service, or both.
      Enter the following information in the fields that are provided:
      • Server
      • Protocol
      • User
      • Password
      • Return email address. This field is available for outgoing mail properties.
    9. Click Apply or OK.
  • Create the mail provider, and optionally define one or more protocol providers.
    In the administrative console, click Resources > Mail > Mail Providers.
    1. Select the scope for the new mail provider.
    2. Click New.
    3. Type the name of the mail provider in the name field.
    4. Optional: Isolate the mail provider.

      You 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. You 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.

      1. Select Isolate this mail provider.
      2. Give the mail provider a unique class path that is appropriate for that version or implementation.
    5. Click Apply or OK.
    6. Define one or more protocol providers for the mail provider.
      1. Click mail_provider.
      2. Click Protocol Providers.
      3. Click New.
      4. Type the protocol name in the Protocol field.
      5. Type the class name in the Class name field.
      6. 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.
      7. 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.
    1. Click mail_provider.
    2. Click Mail Sessions.
    3. Click mail_session.
    4. Make changes to appropriate fields.
    5. Click Apply or OK.

What to do next

If your application has a client, you can configure mail providers and sessions using the Application Client Resource Configuration Tool.