Sending an Email from Oracle Service Bus - Part 1

Note: This post was first published before Oracle merged with BEA when the Oracle Service Bus product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.

The first step is to create an SMTP Server configuration (it is the SMTP server that actually sends the email). To do this, you need to do the following:

- 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 Add and enter the details for your SMTP Server, e.g.

smtpserver

- Click Save.

Now we have an SMTP Server configuration we can use 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:

emailBusinessService

- Click Next

- 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:<email address you want the service to send email to> and click Add:

emailBusinessService2

- Click Next

- Select your SMTP Server from the drop down list of SMTP Servers available and configure the rest of the settings on this screen appropriately, e.g.

emailBusinessService3

- 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.

You have now successfully created an email business service which you can use to send email from Oracle Service Bus. If you click on the bug icon in the Actions column alongside it, you can use the Test Console to prove this service does indeed send an email to the address you specified, with the settings you configured and the payload you specified in the Test Console.

In the second post of this set I will explain how a proxy service can make use of this email business service and some tips for customising the email sent.

Comments:

Hi Chris that's a helpful post. Only one issue in future posts make sure the screen shots are a bit bigger and could be more visible. rest everything is perfect.Keep them coming.

Posted by Nitin on December 18, 2008 at 02:49 AM GMT #

Thanks - note you can click on the images for a much larger version too.

Posted by Chris Tomkins on January 12, 2009 at 07:13 AM GMT #

Nice post. Thanks, Chris. I have another question when sending emails. Where to set the subject of the email to be sent? I just tested it and found the subject is empty when received.

Posted by Brenda on March 10, 2009 at 03:21 AM GMT #

Hi Brenda, If you read part 2 of this article on my blog, then you should see exactly how to set the subject of the email. Hope that helps. Chris

Posted by Chris Tomkins on March 25, 2009 at 07:27 AM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

UK Pre-Sales consultant specialising in business integration.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today