16.2. Mail session

Mail session defines the mail server properties that are used for sending emails if required by the application, such as, escalation or notification mechanisms (refer to the Red Hat JBoss BPM Suite User Guide).

16.2.1. Setting up mail session

To set up the mail session for your execution engine, do the following:
  1. Open the respective profile configuration file (standalone.xml or host.xml) for editing.
  2. Add the mail session to the urn:jboss:domain:mail:1.1 subsystem.

    Example 16.3. New mail session on localhost

    <subsystem xmlns="urn:jboss:domain:mail:1.1">
        <!-- omitted code -->
    
        <mail-session jndi-name="java:/mail/bpmsMailSession" debug="true" from="bpms@company.com">
            <smtp-server outbound-socket-binding-ref="bpmsMail"/>
        </mail-session>
    </subsystem>
    
  3. Define the session outbound socket in the profile configuration file.

    Example 16.4. Outbound socket definition

    <outbound-socket-binding name="bpmsMail">
        <remote-destination host="localhost" port="12345"/>
    </outbound-socket-binding>