View Jitterbit Developer Portal
Introduction
An Email Send Email activity sends email using the Simple Mail Transfer Protocol (SMTP) to specified recipients and is intended to be used as a target to consume data in an operation. After configuring an Email connection, you can configure as many Email activities as you like for each Email connection.
Creating an Email Activity
From the design canvas, open the Connectivity tab of the design component palette:
Use the Show dropdown to filter on Endpoints, and then click the Email connection block to display activities that are available to be used with an Email connection:
To create an activity that can be configured, drag an Email Send Email activity from the palette to the operation.
For more information about the parts of an operation and adding activities to operations, see Operation Creation and Configuration.
Configuring an Email Send Email Activity
Follow these steps to configure an Email Send Email activity:
Step 1: Enter a Name and Specify Settings
WARNING: If a transformation is used to supply the request for this activity, input for the following fields will be overridden: To, CC, BCC, From, Mail Subject Line, Mail Body.
TIP: Fields with a variable icon global variables,
project variables, and
Jitterbit variables. Begin either by typing an open
square bracket [
into the field or by clicking the variable icon to display a list of the existing variables to
choose from.
-
Name: Enter a name to use to identify the Email Send Email activity. The name must be unique for each Email Send Email activity and must not contain forward slashes (
/
) or colons (:
). -
To: Enter the comma-separated email addresses of recipients to receive the email. Input is required in at least one of the recipient fields To, CC, or BCC unless a transformation supplies the request.
-
CC: Enter the comma-separated email addresses of recipients to receive a copy of the email. Input is required in at least one of the recipient fields To, CC, or BCC unless a transformation supplies the request.
-
BCC: Enter the comma-separated email addresses of recipients to receive a blind copy of the email. Input is required in at least one of the recipient fields To, CC, or BCC unless a transformation supplies the request.
-
From: Enter the email address from which recipients will receive the email. Input is required but ignored if a transformation supplies the request.
-
Mail Subject Line: Enter the subject line of the email. Input is ignored if a transformation supplies the request.
-
Mail Body: Enter the body content of the email. Input is ignored if a transformation supplies the request. This field supports both HTML and variables. Variables can be entered in text format by enclosing the variable name within square brackets
[
]
. For example, this HTML email uses a variableemail_address
:<html> <head> <title>Page Title</title> </head> <body>
<h1>This Is a Heading</h1> <p>This is a paragraph.</p>
<p><a href="https://www.example.com/html/message/">Visit our HTML tutorial.</a></p> <p>Send me an email at [email_address].</p>
</body> </html>
-
Save & Exit: If enabled, click to save the configuration for this step and close the activity configuration.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 2: Review the Data Schemas
-
Data Schema: The JSON request and response data schemas for the Email activity are displayed. If the operation
uses a transformation, the data schemas are displayed again later during the transformation mapping process, where you can map to target fields using source objects, scripts, variables, custom values, and more.If a transformation is used to supply the request for this activity, recipient and other email information provided in the activity configuration is ignored. The request and response data schemas are static, as they are built into the connector. Refer to the tables below for all possible fields.
-
Request:
Request Schema Field/Node Description sendMailRequest Node of the email request recipients Node of recipients to Node of recipients of the email "to" field item Node of the item of recipients of the email "to" field #text String value of a single "to" recipient email address cc Node of recipients of the email "cc" field item Node of the item of recipients of the email "cc" field #text String value of a single "cc" recipient email address bcc Node of the item of recipients of the email "bcc" field item Node of the item for recipients to receive a blind copy of the email #text String value of a single "bcc" recipient email address from String of the email "from" field subject String of the email "subject" field mailBody String of the email "body" field attachments Node of email attachments item Node of email attachments item fileName String of the email attachment filename base64content String of the base64-encoded attachment content
TIP: You can use Jitterbit'sBase64Encode
function to encode attachment content. -
Response:
Response Schema Field/Node Description sendEmailResponse Node of the email response isSent Boolean of whether the email was sent ( true
) or not (false
)errorDetails Node of the error details errorCode String of the error code returned by the email server errorMsg String of the error message returned by the email server
-
-
Refresh: Click the refresh icon
or the word Refresh to regenerate schemas from the Email endpoint. This action also regenerates the schema in other locations throughout the project where the same schema is referenced, such as in an adjacent transformation.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Finished: Click to save the configuration for all steps and close the activity configuration.
-
Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Next Steps
After configuring an Email Send Email activity, complete the configuration of the operation by adding and configuring other activities, transformations, or scripts as operation steps. You can also configure an operation's operation settings, which include the ability to chain operations together that are in the same or different workflows.
After an Email activity has been created, menu actions for that activity are accessible from the project pane in either the Workflows or the Components tabs, and from the design canvas. See Activity Actions Menu for details.
Email Send Email activities can be used as a target with these operation patterns:
- Transformation Pattern
- Two-Transformation Pattern (as the first or second target)
Other patterns are not valid using Email Send Email activities. See the validation patterns on the Operation Validity page.
A typical use case is to use an Email Send Email activity in the Two-Transformation Pattern. In this example, the first transformation (Send Email Request) creates a request structure that is passed to the Send Email activity. The second transformation (Send Email Response) receives the response structure, which is then written to a variable by a Variable Write activity (Write Send Email Response) and a message is then logged by the Write to Operation Log script:
To use the activity with scripting functions, write the data to a temporary location and then use that temporary location in the scripting function.
When ready, deploy and run the operation and validate behavior by checking the operation logs.