Skip to main content

Email step reference

This topic describes the settings for the Email step available in Continuous Delivery (CD) and custom stages.

The Email step lets you easily send emails to users and teams during a pipeline execution.

picture 1

The Email step has the following features:

YAML example

           steps:
- step:
type: Email
name: Update Status
identifier: Update_Status
spec:
to: [email protected]
cc: [email protected]
subject: Deployment Status
body: "Pipeline: <+pipeline.name> is complete. Harness deployed service <+service.name> into environment <+env.name>"
timeout: 10m

To

The email address(es) where you want this Harness pipeline to send an email.

This setting can use be a comma-separated string of addresses. For example, [email protected], [email protected].

You can set To as a runtime input.

You can pass in the email as a Harness expression, such as <+pipeline.triggeredBy>.

For more information on runtime inputs and expressions, go to Fixed Values, Runtime Inputs, and Expressions.

CC

You can add email addresses to the CC section to carbon copy addresses on the email that will be sent with the pipeline execution.

Subject

You can provide a subject for the email.

This subject can be a fixed string (for example, Prod Deployment Notification), a string with expressions (for example, <+env.name> Deployment Notification), or a runtime input.

For more information on runtime inputs and expressions, go to Fixed Values, Runtime Inputs, and Expressions.

Body

The Body is a string field. You can enter in text and Harness expressions. Harness will resolve the expressions before sending the email.

For more information on runtime inputs and expressions, go to Fixed Values, Runtime Inputs, and Expressions.

Advanced settings

In Advanced, you can use the following options:

Options

You can send emails using your own SMTP Server. For more information, go to Add SMTP Configuration.