Email messages can be automatically sent upon the completion of an operation. You can create success or failure notifications. Email messages can also be used as an argument to the
Creating an Email Message
Follow these steps to create an email message for a notification:
Make sure you have opened the appropriate project in which you want to create the new email message.
Create and test an operation.
- Right-click on the Email Messages node in the project tree and choose New Email Message or click Create a New Email Message in the top toolbar. A new tab entitled "New Email Message" will appear in the right pane:
Fill in the properties of the message:
Name: The name of the message, which must be unique within the project.
SMTP Mail Servers (required): Comma-separated list of SMTP servers to use to send the email. The servers will be tried in the order that they are specified until one is found that accepts the message.
To: Comma-separated list of recipients.
From: The email address to appear in the "From" field when the recipient(s) read the email.
- Use SSL/TLS (optional): Click the checkbox to encrypt the email using SSL/TLS protocol.
Authentication (optional): If an SMTP server requires authentication, expand the Authentication fields and check the Use authentication check box. You can then enter an Account and account Password.
Optional: If you expand the optional fields, you can add CC, BCC, and Reply To addresses. The addresses in the CC field will receive a copy of the message, the addresses in the BCC field will receive a blind copy of the message. The Reply To address is the one you want replies to be sent to by default (used when the recipient presses reply in their chlientemail application). This can be used if you send the email from a one account but you want replies to go to a different email account.
Subject: The subject of the email.
Text: The body of the email.
Click the Save icon in the toolbar in the upper right corner to save the email.
NOTE: All of these fields recognize global data element substitutions. For example, if you don't know who the recipient will be until run time, you can set a global data element called "notify_email" during the transformation (using a DBLookup() or by input data) and then enter
[notify_email]in the To field.
Once you specify the properties for the email message, you must associate the email message with one or more operations.
In the project tree, click on the operation to which you want to add the notification message; its properties will be displayed in the right-hand pane.
Expand the Options drop-down menu by clicking the at the top of the operation graphic.
From the drop-down menu, select On Success or On Failure.
- From the side-bar menu select Email > Select Existing.
- A pop-up window displays the list of existing email messages. Select the email message created in the previous steps from the list and click OK.
- The email will be added to the operation graphic; it will be added with a green arrow if you selected to send On Success, and added with a red arrow if you selected On Failure.
Deploy your project.
Adding Dynamic Parameters
Dynamic parameters such as "[date]" do not work in the Subject or Text fields. In Jitterbit Design Studio,
date() is defined as a function. To pass a date as a variable, you can create a variable in a script and assign it a value, and then use it in your email message. For example:
Using HTML in an Email Notification
You can use HTML in the body of the message:
Variables (in this case, a global variable
email.html) can be used inside HTML tags:
Last updated: Mar 18, 2020