Skip to Content

Send Email with Attachment

Introduction

The Send Email with Attachment plugin provides support for sending emails, with target files as attachments.

This plugin can be associated only with Private Agent Groups and is not available on the Jitterbit Cloud Agent Groups.

Important

Plugins provided by Jitterbit are deprecated. See Deprecation and Support in Plugins. Instead of this plugin, use the Cloud Studio Email connector or a Design Studio Email target. Also see Ways to Send Email.

Download and Add the Plugin

The Send Email with Attachment plugin is a standard Jitterbit plugin that is already available in the Management Console Plugins page and does not need to be downloaded or added to the organization.

If directed by Jitterbit Support, this plugin can be downloaded at the link provided below and added to the organization (see Add New Plugins in Customizations > Plug-ins).

Associate the Plugin with an Agent Group

The Send Email with Attachment plugin must be associated with a Private Agent Group to make the plugin available on all agents in the group (see Associate Agent Groups in Customizations > Plug-ins).

The plugin is listed in the Management Console Plugins page with a display name of Send Email with Attachment.

Set Variables and Use the Plugin in a Project

Refer to these topics for information about using plugins in a project:

The Send Email with Attachment plugin uses these variables:

Name Type Required Description
SendEmail.Host String Required The SMTP server.
SendEmail.SSL Boolean Optional The SSL usage.
SendEmail.UserName String Optional The user name required by the SMTP server for authentication. Does not have to be provided if the server does not require a user name.
SendEmail.Password String Optional The password of the user. Does not have to be provided if the server does not require a password.
SendEmail.Port Integer Optional. The port used by the SMTP server.
SendEmail.To String Required The recipient's email address.
SendEmail.CC String Optional A comma-separated list of CC email addresses.
SendEmail.From String Required The sender's email address.
SendEmail.ReplyTo String Optional The reply-to email address. If not specified, SendEmail.From will be used as reply-to.
SendEmail.Subject String Optional The message subject (optional).
SendEmail.Text String Optional The message text (optional). If the message text starts with <html>, the email will be sent with the text/html content type.
SendEmail.AttachmentName[_N] String Optional

Since this plugin is used pre-target, the target files still have the temporary names that they are given by the Private Agent in the operation. (The files will be given their "real" names, as defined by the operation's target, once they are moved to the target location.)

If you want to set your own names of the attached files you can do so by setting this variable. If there is only one target file, use SendEmail.AttachmentName to set its name. If there are more than one target files, use SendEmail.AttachmentName_2, SendEmail.AttachmentName_3, etc., to set the names of the second, third, etc. file.

SendEmail.OneAttachmentPerEmail Boolean Optional Controls the behavior if more than one attachment file is to be sent. If the value of this variable is true, one email per target file will be sent. If the value of this variable is false, all target files will be attached to a single email. The default value of this variable is false.
SendEmail.SendIfNoAttachments Boolean Optional Controls the behavior if there are no target files. If the value of variable is true, an email without attachments will be sent. If the value of this variable is false, no email will be sent. The default value of this variable is false.
SendEmail.LogLevel String Optional Sets the logging level for this plugin. Logging is turned off by default. The value should be one of the built-in levels defined by java.util.logging.Level. On Private Agents, the plugin log can be found under the directory <JITTERBIT_HOME>/log/plugin/.
SendEmail.Retries Integer Optional Set to the number of times you want to try sending the email if the initial attempt fails. The default is to not try to send it after an initial failure.
SendEmail.RetryWaitSeconds Integer Optional Set to the number of seconds to wait between each retry attempt. Used only if SendEmail.Retries is greater than 0. The default is to wait one minute (60 seconds) between retries.