Create SendEmail plugin procedures

3 minute readExtensibilityDeveloper productivity
On this page

Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

Send Email

Sends email using the CloudBees CD/RO sendEmail API.

Input parameters

Table 1. Send Email input parameters
Parameter Description

Email configuration

Required. The name of the email configuration to use. If no configuration is specified, a configuration named default is used.

To

A semicolon-separated list of To recipients for the email message. The recipient can be a user, a group name, or a complete email address. You can enter this argument more than once to specify multiple recipients.

CC

A semicolon-separated list of CC recipients for the email message. The recipient can be a user, a group name, or complete email address. You can enter this argument more than once to specify multiple recipients.

BCC

A semicolon-separated list of BCC recipients for the email message. The recipient can be a user, a group name, or a complete email address. You can enter this argument more than once to specify multiple recipients.

Subject

Required. The subject of the email message.

Message

The body of the email message, or a workspace file containing the body. If both a plain text and an HTML message are provided, both values are sent as alternates in a multipart message. If a raw message is provided, the value should be a properly formatted RFC 822 message.

Plain text or file name

Radio button to choose either Plain text or File name.

Plain

The body of a simple text message.

Workspace file

Reads the specified client-side file and uses it as the body of a simple text message.

HTML text or file name

Radio button to choose either HTML text or File name.

HTML

The body of a simple HTML message.

Workspace file

Reads the specified client-side file and uses it as the body of a simple HTML message.

Raw text or file name

Radio button to choose either Raw text or File name.

Raw

The body of a simple raw message.

Workspace file

Reads the specified client-side file and uses it as the entire mail message, including headers.

Advanced options

Select checkbox for advanced options.

Multipart mode

The multipart mode of the email message.

  • none: Non-multipart message.

  • mixed: Single-root, multipart element of type mixed. Text, inline elements, and attachments are added to this root element.

  • related: Multipart message with a single root multipart element of related type. Text, inline elements, and attachments are added to this root element. It works on most mail clients, except Lotus Notes.

  • mixedRelated: Multipart mixed element with a nested multipart related element. Text and inline elements are added to the nested related element, while attachments are added to the mixed root element. It works on most mail clients other than Mac Mail and some situations on Outlook. If you experience problems, use the related value.

The default is none unless there are multiple parts, in which case it defaults to mixedRelated. If both text and html arguments are specified, both values are sent as alternates in a multipart message.

Header(s)

An RFC 822 message with a newline-separated list of email headers. For example, reply-to: user@example.com.

Attachment(s)

A newline-separated list of one or more file names to send as attachments.

In-line Attachment(s):

A newline-separated list of one or more inline attachments specified as a contentId and a client-side filename in the following format: contentId=fileName. The filename extension is examined to determine the content-type. The contentId can be referenced in an HTML body using the Content Interactive Delivery (CID) protocol.