Blog
Oracle SOA Suite 11g supports a number of different notification channels through the User Messaging Service (UMS). This blog provides a step-by-step guide for configuring and testing email notification. Once email notification has been configured, emails can be sent from SOA Suite components such as BPEL processes and Human Tasks. For this example, Gmail will be used as the mail server.
To support email notification from SOA Suite 11g the UMS email driver and workflow notification properties to be configured with the mail server details. This can be done through the Enterprise Manager Fusion Middleware Control console (e.g. http://localhost:7001/em) as follows:

OutgoingMailServer - The SMTP hostname
OutgoingMailServerPort - The SMTP port
OutgoingMailServerSecurity - The type of security (e.g. SSL)
OutgoingUsername - The mail user account
OutgoingPassword - The mail user password




Before SOA Suite can send emails with Gmail there are some SSL certificates that will need to be imported. This step can be ignored if sending from an alternative mail server that does not require SSL.
openssl s_client -connect host:port

keytool -import -alias AliasName -keystore KeystoreLocation -file CertificateLocation
-Djavax.net.ssl.trustStore=CertificateLocation
-Djavax.net.ssl.trustStorePassword=CertificatePassword
This can be done in Arguments field available under the Server Start tab for the SOA Server (e.g. soa_server1) in the WebLogic Administration Console (e.g. http://localhost:7001/console) or by adding the properties to the DOMAIN_HOME/bin/setDomainEnv.cmd (or setDomainEnv.sh). For example:
set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Djavax.net.ssl.trustStore=%WL_HOME%\server\lib\gmail-keystore.jks -Djavax.net.ssl.trustStorePassword=changeit
Now that we have configured outbound email notification, we want to test our configuration easily without having to create a BPEL process or human task to do this. Fortuntately, we can do this from Enterprise Manager Fusion Middleware Control.



If you encounter an issue with the outgoing email notification, it is a good idea to check the SOA server log (available at DOMAIN_HOME/servers/<soa server name>/logs/<soa server name>.log and/or .out) for error messages. Listed below are some common errors with and their solution:
Error Message: ORABPEL-31023 - Cannot send email notification to <email address> address. The address is being marked as invalid and no further notification would be sent to this address.
Diagnosis: Due to a number of previous failed send attempts to an email address, SOA Suite has added the address to the Bad Address List thus preventing subsequent sends to this address from failing. The previous failed attempts may been caused by a configuration issue.
Remedy: Remove the email address from the Bad Address List. This can be done by selecting View Bad Addresses from the Notification Management page in Enterprise Manager. When the Bad Address List dialog box is displayed, remove the email address from this list.