In most of scenarios we came across sending notification to customer in case any error occur in Oracle Service Bus. In this post I will explain how to configure email in Oracle Service Bus.
1.) The first step is to create an SMTP Server configuration (it is the SMTP server that actually sends the email). To do this, follow below steps:
· Click on the System Administration link in the left hand navigation in the service bus console.
· Click on Create in the Change Center to create a new session in which you can make changes.
· Click on SMTP Servers link.
- Click on Add and enter the details for your SMTP Server.
- Description- description for the SMTP serverServer URL- UR mail server address. In my case email server is installed on my local machine so I will give local machine IP. e.g. smtp.test.comPort Number - Port of server.Username – username for server
Password- password for server
2.) Now we have an SMTP Server configuration, we can use this configuration multiple times within Oracle Service Bus without entering this information again. The next step is to create an email business service that uses this SMTP Server configuration:
· Click on the Project Explorer link in the left hand navigation
· Select (or create) the project and folder you want to create the email business service in.
- From the Create Resource drop down select Business Service.
- Enter a name and description for your business service and ensure you select the Service Type as Messaging Service:
- Select Text as the Request Message Type, leave the Response Message Type as none (sending email is a one-way service) and then click Next.
- On the next screen, select the Protocol as email and set the Endpoint URI to be mailto: and click Add.
- Select your SMTP Server from the drop down list of SMTP Servers available and configure the rest of the settings on this screen appropriately
- Click Next, review the summary and then click Save.
- Click Activate to enforce these changes to Oracle Service Bus.
- Enter a description and click Submit.
3 3.) Now Test the Business Service. You can see in your email Inbox