July 30, 2023

cAWSSES – Docs for ESB ESB 7.x

cAWSSES

Sends emails with Amazon’s Simple Email Service (SES).

cAWSSES Standard properties

These properties are used to configure cAWSSES running in the Standard Job framework.

The Standard
cAWSSES component belongs to the AWS and Connectivity families.

Basic settings

Connection

Select an AWS connection component from the list to reuse the connection details you
already defined.

Subject

Specify the email subject. It can be overriden by the CamelAwsSesSubject
header.

From

Specify the sender’s email address. It can be overriden by the
CamelAwsSesFrom header.

To

Specify one or more destination email addresses. It can be overriden by the
CamelAwsSesTo header.

Return Path

Specify the email address to which bounce notifications are to be forwarded. It can be
overriden by the CamelAwsSesReturnPath header.

Reply to Addresses

Specify the reply-to email address(es) for the message. It can be overriden by the
CamelAwsSesReplyToAddresses header.

Message Headers

Set the message headers in the corresponding table. Click [+] as many times as required to add message headers
to the table. Then click the corresponding Value field and enter a value. See the site http://camel.apache.org/aws-ses.html for available
headers.

Advanced settings

Advanced

Set the optional parameters in the corresponding table. Click
[+] as many times as required
to add parameters to the table. Then click the corresponding
Value field and enter a value.
See the site http://camel.apache.org/aws-ses.html for available
options.

Usage

Usage rule

cAWSSES can be a start, middle or
end component in a Route. It has to be used with the cAWSConnection component, which creates a
connection to Amazon Web Services. For more information about
cAWSConnection, see cAWSConnection.

Limitation

 n/a

Sending Email using the cAWSSES component

This scenario applies only to Talend Open Studio for ESB, Talend Data Services Platform and Talend Data Fabric.

This scenario will show you how to use the cAWSSES
component to send emails with Amazon’s SES service.

Dropping and linking the components

cAWSSES_1.png

  1. From the Palette, drag and drop a cAWSConnection, a cTimer, a
    cSetBody, a cAWSSES, and a cProcessor
    component onto the design workspace.
  2. Label the components for better identification of their roles and link them
    with the Row > Route connection as shown above.

Configuring the components

  1. Double-click the cAWSConnection component to display its
    Basic settings view in the Component tab.

    cAWSSES_2.png

  2. In the Access Key and Secret Key fields, enter the authentication credentials.
  3. Double-click the cTimer component to open its
    Basic settings view in the Component tab.

    cAWSSES_3.png

  4. In the Repeat field, enter 1 to
    generate the message exchange one time. Keep the default settings of the other
    options.
  5. Double-click the cSetBody component to open
    its Basic settings view in the Component tab.

    cAWSSES_4.png

  6. Select CONSTANT from the Language drop-down list and type in "Hello
    world"
    in the Expression field as
    the message body.
  7. Double-click the cAWSSES component to open its Basic settings view in the Component tab.

    cAWSSES_5.png

  8. In the Connection list, select the cAWSConnection component that you have just
    configured to connect to Amazon SES service.

    In the Subject field, enter the email
    subject, for example, "Hello" in this use case.
    In the From and To fields, enter the sender’s email address and the destination
    email address respectively.
    In the Return Path field, enter the email
    address to which bounce notifications are to be forwarded.
    In the Reply To field, enter the email address to receive
    replies.
  9. Double-click the cProcessor component to
    display its Basic settings view in the
    Component tab.

    cAWSSES_6.png

  10. In the Code box, enter the following code to
    print the CamelAwsSesMessageId in the execution
    console:System.out.println("CamelAwsSesMessageId: "+exchange.getIn().getHeader("CamelAwsSesMessageId"));
  11. Press Ctrl+S to save your Route.

Viewing the code and executing the Route

  1. Click the Code tab at the bottom of the
    design workspace to check the generated code.

    cAWSSES_7.png

    As shown above, the message flow from sesproducer_cTimer_1 is
    given a payload by sesproducer_cSetBody_1. Then it is sent to
    sesproducer_cAWSSES_1 and processed by
    sesproducer_cProcessor_1.
  2. Press F6 to execute the Route. The logs of
    the message exchange are printed in the console.

    cAWSSES_8.png

  3. An email is sent to the destination address.

    cAWSSES_9.png

  4. When replying the email, the destination is the email address specified in the To field of the cAWSSES component.

    cAWSSES_10.png


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x