August 17, 2023

tSendMail – Docs for ESB 5.x

tSendMail

tSendMail.png

tSendMail Properties

Component family

Internet

 

Function

tSendMail sends emails and
attachments to defined recipients.

Purpose

tSendMail purpose is to notify
recipients about a particular state of a Job or possible
errors.

Basic settings

To

Main recipient email address.

 

From

Sending server email address.

 

Show sender’s name

Select this check box if you want the sender name to show in the
messages.

 

Cc

Email addresses of secondary recipients of the email message
directed to another.

 

Bcc

Email addresses of secondary recipients of the email message.
Recipients listed in the Bcc field
receive a copy of the message but are not shown on any other
recipient’s copy.

 

Subject

Heading of the mail.

 

Message

Body message of the email. Press Ctrl+Space to display the list of available
variables.

 

Die if the attachment file doesn’t
exist

This check box is selected by default. Clear this check box if you
want the message to be sent even if there are no attachments.

 

Attachments / File and Content Transfer
Encoding

Click the plus button to add as many lines as needed where you can
put filemask or path to the file to be sent along with the mail, if
any. Two options are available for content transfer encoding,
Default and Base64.

 

Other Headers

Click the plus button to add as many lines as needed where you can
type the Key and the corresponding
Value of any header information
that does not belong to the standard header.

 

SMTP Host and Port

IP address of SMTP server used to send emails.

 

SSL Support

Select this check box to authenticate the server at the client
side via an SSL protocol.

 

STARTTLS Support

Select this check box to authenticate the server at the client
side via a STARTTLS protocol.

 

Importance

Select in the list the priority level of your messages.

 

Need authentication / Username and
Password

Select this check box and enter a username and a password in the
corresponding fields if this is necessary to access the
service.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

 

Die on error

This check box is selected by default. Clear the check box to skip
the row on error and complete the process for error-free
rows.

Advanced settings

MIME subtype from the ‘text’ MIME type

Select in the list the structural form for the text of the
message.

 

Encoding type

Select the encoding from the list or select Custom and define it manually.

 

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at a
Job level as well as at each component level.

Global Variables

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio
User Guide.

Usage

This component is typically used as one sub-job but can also be
used as output or end object. It can be connected to other
components with either Row or
Iterate links.

Log4j

The activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User
Guide
.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Limitation

n/a

Scenario: Email on error

This scenario creates a three-component Job which sends an email to defined recipients
when an error occurs.

Use_Case_tSendMail.png
  • Drop the following components from your Palette to the design workspace: tFileInputDelimited, tFileOutputXML, tSendMail.

  • Define tFileInputdelimited properties.
    Related topic: tFileInputDelimited.

  • Right-click on the tFileInputDelimited
    component and select Row > Main. Then drag it onto the
    tFileOutputXML component and release when
    the plug symbol shows up.

  • Define tFileOutputXML properties.

  • Drag a Run on Error link from tFileDelimited to tSendMail component.

  • Define the tSendMail component
    properties:

Use_Case_tSendMail1.png
  • Enter the recipient and sender email addresses, as well as the email
    subject.

  • Enter a message containing the error code produced using the corresponding
    global variable. Access the list of variables by pressing Ctrl+Space.

  • Add attachments and extra header information if any. Type in the SMTP
    information.

Use_Case_tSendMail2.png

In this scenario, the file containing data to be transferred to XML output cannot be
found. tSendmail runs on this error and sends a
notification email to the defined recipient.


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