Sending Emails at the Conclusion of Batch Processes
It is possible to send a notification email when a batch process has ended. This notification happens after the batch process has ended and all application-related commits or rollbacks have taken place. It does not impact the batch process itself in the event of errors happening during the notification process. The default email is a simple text email that contains the batch control, date and time of the submission, run number, submission parameters, batch process summary indicating records processed and in-error, as well as the thread details, including logged messages (up to 100).
The email address can be an individual person or a valid mail group (the latter requires additional configuration in your email system).
To use email notification the email server must be configured using one of the following options:
1. The mail server can be defined through the default Message Sender (Class RTEMAILSNDR) with the appropriate SMTP settings on the Context tab.
2. Alternatively the properties can be supplied in the form of JVM properties as follows:
# Host whose mail services will be used
# (Default value : localhost)
mail.host=<your mail server>
# Return address to appear on emails
# (Default value : username@host)
mail.from=<name@host>
# Other possible items include:
# mail.user=
# mail.store.protocol=
# mail.transport.protocol=
# mail.smtp.host=
# mail.smtp.user=
# mail.debug=
 
Name
Type
Description
mail.debug
Boolean
The initial debug mode. Default is false.
mail.from
String
The return email address of the current user, used by the InternetAddress method getLocalAddress.
To ensure that the value of the mail.from property is handled properly when set through a user exit include file, add a '\' (backslash) in front of the '@' symbol.
For example, if the value desired for mail.from is demo@orgname.org then it should be set as demo\@orgname.org
mail.host
String
The default host name of the mail server for both Stores and Transports. Used if the mail.protocol.host property isn't set.
mail.mime.address.strict
Boolean
The MimeMessage class uses the InternetAddress method parseHeader to parse headers in messages. This property controls the strict flag passed to the parseHeader method. The default is true.
mail.smtp.class
String
Specifies the fully qualified class name of the provider for the specified protocol. Used in cases where more than one provider for a given protocol exists; this property can be used to specify which provider to use by default. The provider must still be listed in a configuration file.
mail.smtp.host
String
The host name of the mail server for the specified protocol. Overrides the mail.host property.
mail.smtp.port
int
The port number of the mail server for the specified protocol. If not specified, the protocol's default port number is used.
mail.smtp.user
String
The username to use when connecting to mail servers using the specified protocol. Overrides the mail.user property.
mail.smtp.password
String
The password to use when connecting to mail servers using the specified protocol.
mail.store.protocol
String
Specifies the default message access protocol. The Session method getStore() returns a Store object that implements this protocol. By default, the first Store provider in the configuration files is returned.
mail.transport.protocol
String
Specifies the default message access protocol. The Session method getTransport() returns a Transport object that implements this protocol. By default the first Transport provider in the configuration files is returned. To enable SSL, set this property to "smtps".
mail.debug
String
Specifies the debug mode is enabled.
mail.user
String
The default username to use when connecting to the mail server. Used if the mail.protocol.user property isn't set
 
These properties can be added to the threadpoolworker’s spl.properties file for the standalone batch threadpoolworker, or the spl.properties file for an online application server that hosts a batch worker.