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.
Follow these steps to create notifications:
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 new email message on top toolbar. A new tab entitled "New Email Message" will appear in the right pane.
Fill in the properties of your message:
Message Name: The name of your message, which must be unique within your project.
SMTP Mail Servers (required): Comma separated list of SMTP servers that you want to use to send your email. The servers will be tried in the order that they are specified until one is found to accept the message.
To: Comma separated list of recipients.
From: The email address that you want 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 your SMTP server requires authentication you must 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 ones in the BCC field will get a blind copy of your message. The Reply To address is the one you want replies to be sent to by default (i.e. when the recipient presses reply). This can be used if you send the email from a common account but you want replies to go to your personal email inbox.
Subject: The subject of the email.
Text: The body of your email
Note All of these fields recognize global data element substitutions. E.g. if you don't know who the recipient will be until you have run your operation you can set a global data element called "notify_email" during the transformation (e.g. using a DBLookup or input data) and then enter [notify_email] in the To-field.
- Click the Save icon in the toolbar in the upper right corner to save the email.
Once you specify the properties for your email message, you must associate the Email Message with one or more operations.
In the Project Tree, Click on the operation that you want to add a notification message to; 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.
- From the side-bar menu Click Select Existing.
- A pop-up window displays the list of existing email messages. Select the Email created in the previous step from the list and Click OK.
- The Email will be added to the operation graphic with a green arrow if you selected to send On Success, or a red arrow if you selected On Failure.
Deploy your project.
Dynamic parameters like "[date]" do not work in Subject or Text. In Jitterbit Studio, date() is defined as a function. If you would like to pass date as a variable, you could create a variable in a script and assign it a value, then pass it in your email message.
Ex: $date = Now() would give you the current date and time
$date = CVTDate(Now(),"yyyy-mm-dd HH:MM:SS","yyyy-mm-dd") would give you just the date
Last updated: Jul 18, 2018