Dagweave catalog

Send an email via SMTP

email-sendv1.0.1updated 2026-08-022 versions

Send a plain-text email through an authenticated SMTP submission server (STARTTLS), with the password read from a Kubernetes Secret.

Install v1.0.1

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/email-send/1.0.1/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/email-send/1.0.1/template.yaml

Facts

Category
Notifications
Tags
curl notifications
Entrypoint
send
Template SHA-256
1b08dd21ad8b6d2f27d8cbf2c9c7503fdafde31c2f0ccb6edd3e0ad6bac22483
Source
email-send at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
curlimages/curlnone recordedsha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93

Parameters

NameDescriptionDefault
body required Plain-text message body. none
from required Envelope sender / From header address.
Example alerts@example.com
none
smtp-host required Hostname of the SMTP submission server.
Example smtp.example.com
none
smtp-username required Username for SMTP AUTH. Often the same as the From address. none
subject required Subject line of the email. none
to required Recipient email address.
Example ops@example.com
none
password-secret-key Key within the Secret that holds the SMTP password. password
password-secret-name Name of the Kubernetes Secret in the run namespace holding the SMTP password. smtp-password
smtp-port Port of the SMTP submission server (587 is STARTTLS submission). 587

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: email-send
  labels:
    dagweave.io/catalog-item: email-send
  annotations:
    # The catalog semver this manifest was authored at. The dagweave app records
    # (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
    dagweave.io/catalog-version: "1.0.1"
    dagweave.io/catalog-category: "Notifications"
spec:
  entrypoint: send
  templates:
    - name: send
      inputs:
        parameters:
          # Recipient address, e.g. "ops@example.com".
          - name: to
          # Subject line.
          - name: subject
          # Plain-text message body.
          - name: body
          # Envelope sender / From header, e.g. "alerts@example.com".
          - name: from
          # SMTP submission host, e.g. "smtp.example.com".
          - name: smtp-host
          # SMTP submission port. 587 (STARTTLS submission) is the usual default.
          - name: smtp-port
            default: "587"
          # SMTP AUTH username. Often the same as `from`; not itself secret.
          - name: smtp-username
          # Name/key of the Kubernetes Secret in the run namespace holding the SMTP
          # password. Defaults let a user leave them blank in the Inspector.
          - name: password-secret-name
            default: smtp-password
          - name: password-secret-key
            default: password
      container:
        # Pinned by digest per the catalog convention: an image rebuild can never
        # silently change the behaviour of an already-released item version.
        # curlimages/curl:8.23.0 — curl speaks SMTP, so no custom image is needed.
        image: curlimages/curl@sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93
        command: [sh, -c]
        # Values are passed as env vars (below), never interpolated into the shell,
        # so a subject/body containing quotes or shell metacharacters is safe. The
        # RFC 5322 message is assembled with printf "%s" (which does not re-parse its
        # arguments) and streamed to curl over an --ssl-reqd (STARTTLS) connection.
        args:
          - |
            set -eu
            {
              printf 'From: %s\r\n' "$MAIL_FROM"
              printf 'To: %s\r\n' "$MAIL_TO"
              printf 'Subject: %s\r\n' "$MAIL_SUBJECT"
              printf 'MIME-Version: 1.0\r\n'
              printf 'Content-Type: text/plain; charset=UTF-8\r\n'
              printf '\r\n'
              printf '%s\r\n' "$MAIL_BODY"
            } | curl -sSf --ssl-reqd \
                  --url "smtp://${SMTP_HOST}:${SMTP_PORT}" \
                  --user "${SMTP_USERNAME}:${SMTP_PASSWORD}" \
                  --mail-from "$MAIL_FROM" \
                  --mail-rcpt "$MAIL_TO" \
                  --upload-file -
        env:
          - name: MAIL_TO
            value: "{{inputs.parameters.to}}"
          - name: MAIL_SUBJECT
            value: "{{inputs.parameters.subject}}"
          - name: MAIL_BODY
            value: "{{inputs.parameters.body}}"
          - name: MAIL_FROM
            value: "{{inputs.parameters.from}}"
          - name: SMTP_HOST
            value: "{{inputs.parameters.smtp-host}}"
          - name: SMTP_PORT
            value: "{{inputs.parameters.smtp-port}}"
          - name: SMTP_USERNAME
            value: "{{inputs.parameters.smtp-username}}"
          - name: SMTP_PASSWORD
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.password-secret-name}}"
                key: "{{inputs.parameters.password-secret-key}}"

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.1 latest 2026-08-02

    Move curlimages/curl from 8.11.1 to 8.21.0. Fixable CRITICAL/HIGH drops from 26 to 1.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/email-send/1.0.1/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/email-send/1.0.1/template.yaml

    version document, template.yaml

  2. 1.0.0 2026-07-16

    Initial release.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/email-send \
  -p body=... \
  -p from=alerts@example.com \
  -p smtp-host=smtp.example.com \
  -p smtp-username=... \
  -p subject=... \
  -p to=ops@example.com

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: email-send-
spec:
  workflowTemplateRef:
    name: email-send
  arguments:
    parameters:
      - name: body
        value: "..."
      - name: from
        value: "alerts@example.com"
      - name: smtp-host
        value: "smtp.example.com"
      - name: smtp-username
        value: "..."
      - name: subject
        value: "..."
      - name: to
        value: "ops@example.com"

As a step of a larger workflow

steps:
  - - name: email-send
      templateRef:
        name: email-send
        template: send