---
title: "send-email | Customer&#x27;s Canvas Hub"
canonical: "https://customerscanvas.com/docs/hub/printer-guide/pipelines/tasks/send-email/"
---

# send-email

> Learn how the send-email task sends emails with links to rendered artifacts.

This task sends an email with the rendering results. 

## Parameters

### Overriding parameters

The parameter group allows replacing the default settings in the base configuration. They may be required to send emails to customers using the tenant's SMTP server.

- `host` (string) - SMTP server host address. 
- `port` (number) - SMTP server port. 
- `account` (string) - Email account user. 
- `username` (string) - Username for accessing the account. 
- `password` (string) - Password for server access. 
- `useSsl` (boolean) - Access encryption mode.

### Basic parameters

- `recipients` (string) - Comma-separated list of recipients. Value substitution from project parameters is available. For example, if the current item's `fields` of the project contain an `Email` field filled during project creation, it can be written as `{{project.items.@.fields.Email}}`.

- `subject` (string) - Email subject. Interpolation is available. 
- `body` (string) - Email body. Interpolation is available.
- `useHtmlBody` (boolean) - If `true`, sends the email body as an HTML document.

### Additional parameters

For building a list of artifacts, you can use interpolation `"{{result:url}}"`, where `"result"` is the artifact name from `inputArtifacts`. If you need to display a list, use interpolation `"{{images*:url}}"`, where `"images"` is the name of the artifact collection. However, when using a collection, the links will be written in a line separated by commas. To solve this issue, use the following parameters.

- `bodyLinksPlaceholder` (string) - A marker for inserting the prepared list of download links for all artifacts passed to the task. This sequence is searched in the `body`. If found, it is replaced with the link list. The default marker is `"$$links$$"`.
- `bodyLinksItemTemplate` (string) - A template describing a single line from the link list. The template supports markers for the artifact file link (`bodyLinksItemUrlPlaceholder`) and the artifact name (`bodyLinksItemNamePlaceholder`).

    - Example 1: `"bodyLinksItemTemplate" : "<span>&bull; <a href=\"$$url$$\">$$name$$</a></span><br>"`
    - Example 2: `"bodyLinksItemTemplate" : "Link to download file $$name$$: $$url$$\"`

- `bodyLinksItemUrlPlaceholder` (string) - A marker for inserting the link. Default is `"$$url$$"`. Only works within `bodyLinksItemTemplate`.
- `bodyLinksItemNamePlaceholder` (string) - A marker for inserting the name. Default is `"$$name$$"`. Only works within `bodyLinksItemTemplate`.

These parameters support [argument interpolation](https://customerscanvas.com/docs/hub/printer-guide/pipelines/concepts/interpolation.md) following the common rules.

## Example

```json
{
    "description": "Send link to print file by email",
    "name": "send email",
    "type": "send-email",
    "inputArtifacts": [ "result*" ],
    "parameters": {
        "host": "your-company-smtp-server.com",
        "port": 587,
        "account": "noreply@your-company.com",
        "username": "noreply@your-company.com",
        "password": "some-secret-password",
        "useSsl": true,
        "recipients": "first@example.com, another@example.com",
        "subject": "Your print file {{project.items.@.fields.customName?}} is ready",
        "body": "Greetings {{project.customerName}}. <br> You can download print file for your personalized product here: <br> $$links$$ <br>",
        "useHtmlBody" : true,
        "bodyLinksItemTemplate" : "<span>&bull; <a href=\"$$url$$\">$$name$$</a></span><br>",
        "bodyLinksItemNamePlaceholder" : "$$name$$",
        "bodyLinksItemUrlPlaceholder" : "$$url$$",
        "bodyLinksPlaceholder" : "$$links$$"
    }
}
```
