Tuesday, November 19, 2013

SOA 11g - Email Configuration with multiple accounts - Multiple SMTP server

Below are steps to configure multiple email accounts (associated with different From email address), using different SMTP server.

For example below is hypothetical requirement:,
We have SMTP server running on localhost 25 and localhost 27, and we would like to configure email account Default (chintan@springsoa.com) to send email from localhost 25, and HR (hr@springsoa.com) to send email from (localhost 27).

For the first part, we have to perform the same step as we have done in reference blog where we are creating Default and HR email account. Once that is done, we have to perform following steps:

  • Copy the email plan
 $SOA_HOME/usermessagingdriver-email_Plan.xml -> $SOA_HOME/communications/plans/usermessagingdriver-email_HRPlan.xml
  • Search/Replace in $SOA_HOME/communications/plans/usermessagingdriver-email_HRPlan.xml 
@DriverDeploymentName@    ->        usermessagingdriver-hr
@DriverShortName@               ->        hr
@RunAsPrincipalName@         ->        OracleSystemUser
  • Deploy new Email Driver (EM -> Weblogic Domain -> <> -> Application Deployment -> Deploy
 
  • Select $SOA_HOME/communications/applications/sdpmessagingdriver-email.ear as archive and $SOA_HOME/communications/plans/usermessagingdriver-email_HRPlan.xml as Plan.
 
  • Target to SOA server
 
  • Use below Application Name and Context Root
Application Name : usermessagingdriver-HR
Context Root         : sdpmessagingdriver-HR/email-mbeanlifecycle
 
  • Deploy
 
  • Configure UMS email driver specifically send email with "from" email from chintan@springsoa.com.
    • Go to usermessagingdriver-email -> Email Driver Properties
    • Sender Addresses -> EMAIL:chintan@springsoa.com (note : EMAIL: prefix is required)
 
  • Configure newly created HR email driver
    • Put Sender Address as (EMAIL:hr@springsoa.com) to restrict to use this UMS driver only for email which are being sent from hr@springsoa.com
    • Set the outgoing email server as localhost 27, as HR will be using different SMTP server

  •  Restart
  • Now if we use HR in BPEL email activity, localhost 27 will be used and from email address will be hr@springsoa.com
  • if we use Default in BPEL email activity, localhost 25 will be used and from email address will be chintan@springsoa.com

1 comment:

Unknown said...

Thanks for sharing this great information on Oracle SOA. Actually I was looking for the same information on internet for SOA Interview Questions and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more about SOA by attending Oracle SOA Training training .