Skip to main content

core.send_email_smtp

Send email using SMTP.

Secrets

Required secrets:
  • smtp: required values SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS.

Inputs

body
string
required
Body content of the email
recipients
array[string]
required
List of recipient email addresses
sender
string
required
Email address of the sender
subject
string
required
Subject of the email
allowed_attributes
map[string, array[string]] | null
Key-value pairs of allowed attributes to add to the email body. e.g. {’*’: [‘style’]}. This allows all tags to have a style attributeDefault: null.
bcc
string | array[string] | null
Recipient(s) to be copied in the BCC fieldDefault: null.
cc
string | array[string] | null
Recipient(s) to be copied in the CC fieldDefault: null.
content_type
string
Email content type (‘text/plain’ or ‘text/html’). Defaults to ‘text/plain’.Default: "text/plain".Allowed values: text/plain, text/html.
enable_auth
boolean
Enable SMTP authenticationDefault: false.
enable_ssl
boolean
Enable SSL for secure connectionDefault: false.
enable_starttls
boolean
Enable STARTTLS for secure connectionDefault: false.
headers
map[string, string] | null
Additional email headersDefault: null.
ignore_cert_errors
boolean
Ignore SSL certificate errorsDefault: false.
reply_to
string | array[string] | null
Email address(es) to be used in the Reply-To fieldDefault: null.
sender_prefix
string | null
Email address prefix of the senderDefault: null.
timeout
number | null
Timeout for SMTP operations in secondsDefault: null.

Examples

Send a notification
- ref: notify_team
  action: core.send_email_smtp
  args:
    sender: no-reply@example.com
    recipients:
      - secops@example.com
    subject: "Tracecat alert ${{ TRIGGER.alert_id }}"
    body: "Severity: ${{ TRIGGER.severity }}"
    content_type: text/plain
    enable_starttls: true
    enable_auth: true