Skip to end of metadata
Go to start of metadata

Overview

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 SendEmail() method.

Creating an Email Message

Follow these steps to create an email message for a notification:

  1. Make sure you have opened the appropriate project in which you want to create the new email message.

  2. Create and test an operation.

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

  4. Fill in the properties of the message:

    1. Name: The name of the message, which must be unique within the project.

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

    3. To: Comma-separated list of recipients.

    4. From: The email address to appear in the "From" field when the recipient(s) read the email.

    5. Use SSL/TLS (optional): Click the checkbox to encrypt the email using SSL/TLS protocol.
    6. 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.

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

    8. Subject: The subject of the email.

    9. Text: The body of the email.

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

  5. Once you specify the properties for the email message, you must associate the email message with one or more operations.

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

  7. Expand the Options drop-down menu by clicking the at the top of the operation graphic.

    1. From the drop-down menu, select On Success or On Failure.

    2. From the side-bar menu select Email >  Select Existing.
    3. 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.
  8. 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.
  9. 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:

$date = Now();  # Gives the current date and time
$date = CVTDate(Now(),"yyyy-mm-dd HH:MM:SS","yyyy-mm-dd");  # Gives just the date

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:

On This Page



Related Topics

Last updated:  Mar 18, 2020