{
  "name": "email-send",
  "title": "Send an email via SMTP",
  "category": "Notifications",
  "tags": [
    "curl",
    "notifications"
  ],
  "version": "1.0.1",
  "date": "2026-08-02",
  "notes": "Move curlimages/curl from 8.11.1 to 8.21.0. Fixable CRITICAL/HIGH drops from 26 to 1.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/email-send/1.0.1.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/email-send/1.0.1/template.yaml",
  "entrypoint": "send",
  "parameters": [
    {
      "name": "body",
      "title": "Body",
      "description": "Plain-text message body.",
      "type": "string",
      "required": true
    },
    {
      "name": "from",
      "title": "From",
      "description": "Envelope sender / From header address.",
      "type": "string",
      "required": true,
      "example": "alerts@example.com"
    },
    {
      "name": "smtp-host",
      "title": "SMTP host",
      "description": "Hostname of the SMTP submission server.",
      "type": "string",
      "required": true,
      "example": "smtp.example.com"
    },
    {
      "name": "smtp-username",
      "title": "SMTP username",
      "description": "Username for SMTP AUTH. Often the same as the From address.",
      "type": "string",
      "required": true
    },
    {
      "name": "subject",
      "title": "Subject",
      "description": "Subject line of the email.",
      "type": "string",
      "required": true
    },
    {
      "name": "to",
      "title": "To",
      "description": "Recipient email address.",
      "type": "string",
      "required": true,
      "example": "ops@example.com"
    },
    {
      "name": "password-secret-key",
      "title": "Password secret key",
      "description": "Key within the Secret that holds the SMTP password.",
      "type": "string",
      "required": false,
      "default": "password"
    },
    {
      "name": "password-secret-name",
      "title": "Password secret name",
      "description": "Name of the Kubernetes Secret in the run namespace holding the SMTP password.",
      "type": "string",
      "required": false,
      "default": "smtp-password"
    },
    {
      "name": "smtp-port",
      "title": "SMTP port",
      "description": "Port of the SMTP submission server (587 is STARTTLS submission).",
      "type": "string",
      "required": false,
      "default": "587"
    }
  ],
  "images": [
    {
      "ref": "curlimages/curl@sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93",
      "repository": "curlimages/curl",
      "digest": "sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/email-send/1.0.1/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/email-send/1.0.1/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: email-send\n  labels:\n    dagweave.io/catalog-item: email-send\n  annotations:\n    # The catalog semver this manifest was authored at. The dagweave app records\n    # (catalog-item-id, semver) -\u003e content-hash -\u003e base-vN when it mints the tenant\n    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.\n    dagweave.io/catalog-version: \"1.0.1\"\n    dagweave.io/catalog-category: \"Notifications\"\nspec:\n  entrypoint: send\n  templates:\n    - name: send\n      inputs:\n        parameters:\n          # Recipient address, e.g. \"ops@example.com\".\n          - name: to\n          # Subject line.\n          - name: subject\n          # Plain-text message body.\n          - name: body\n          # Envelope sender / From header, e.g. \"alerts@example.com\".\n          - name: from\n          # SMTP submission host, e.g. \"smtp.example.com\".\n          - name: smtp-host\n          # SMTP submission port. 587 (STARTTLS submission) is the usual default.\n          - name: smtp-port\n            default: \"587\"\n          # SMTP AUTH username. Often the same as `from`; not itself secret.\n          - name: smtp-username\n          # Name/key of the Kubernetes Secret in the run namespace holding the SMTP\n          # password. Defaults let a user leave them blank in the Inspector.\n          - name: password-secret-name\n            default: smtp-password\n          - name: password-secret-key\n            default: password\n      container:\n        # Pinned by digest per the catalog convention: an image rebuild can never\n        # silently change the behaviour of an already-released item version.\n        # curlimages/curl:8.23.0 — curl speaks SMTP, so no custom image is needed.\n        image: curlimages/curl@sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93\n        command: [sh, -c]\n        # Values are passed as env vars (below), never interpolated into the shell,\n        # so a subject/body containing quotes or shell metacharacters is safe. The\n        # RFC 5322 message is assembled with printf \"%s\" (which does not re-parse its\n        # arguments) and streamed to curl over an --ssl-reqd (STARTTLS) connection.\n        args:\n          - |\n            set -eu\n            {\n              printf 'From: %s\\r\\n' \"$MAIL_FROM\"\n              printf 'To: %s\\r\\n' \"$MAIL_TO\"\n              printf 'Subject: %s\\r\\n' \"$MAIL_SUBJECT\"\n              printf 'MIME-Version: 1.0\\r\\n'\n              printf 'Content-Type: text/plain; charset=UTF-8\\r\\n'\n              printf '\\r\\n'\n              printf '%s\\r\\n' \"$MAIL_BODY\"\n            } | curl -sSf --ssl-reqd \\\n                  --url \"smtp://${SMTP_HOST}:${SMTP_PORT}\" \\\n                  --user \"${SMTP_USERNAME}:${SMTP_PASSWORD}\" \\\n                  --mail-from \"$MAIL_FROM\" \\\n                  --mail-rcpt \"$MAIL_TO\" \\\n                  --upload-file -\n        env:\n          - name: MAIL_TO\n            value: \"{{inputs.parameters.to}}\"\n          - name: MAIL_SUBJECT\n            value: \"{{inputs.parameters.subject}}\"\n          - name: MAIL_BODY\n            value: \"{{inputs.parameters.body}}\"\n          - name: MAIL_FROM\n            value: \"{{inputs.parameters.from}}\"\n          - name: SMTP_HOST\n            value: \"{{inputs.parameters.smtp-host}}\"\n          - name: SMTP_PORT\n            value: \"{{inputs.parameters.smtp-port}}\"\n          - name: SMTP_USERNAME\n            value: \"{{inputs.parameters.smtp-username}}\"\n          - name: SMTP_PASSWORD\n            valueFrom:\n              secretKeyRef:\n                name: \"{{inputs.parameters.password-secret-name}}\"\n                key: \"{{inputs.parameters.password-secret-key}}\"\n",
  "templateSha256": "1b08dd21ad8b6d2f27d8cbf2c9c7503fdafde31c2f0ccb6edd3e0ad6bac22483",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/email-send",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
