MailSend ​Mail​Send

yaml
type: "io.kestra.plugin.notifications.mail.mailsend"
yaml
id: unreliable_flow
namespace: company.team

tasks:
  - id: fail
    type: io.kestra.plugin.scripts.shell.Commands
    runner: PROCESS
    commands:
      - exit 1

errors:
  - id: send_email
    type: io.kestra.plugin.notifications.mail.MailSend
    from: hello@kestra.io
    to: hello@kestra.io
    username: "{{ secret('EMAIL_USERNAME') }}"
    password: "{{ secret('EMAIL_PASSWORD') }}"
    host: mail.privateemail.com
    port: 465 # or 587
    subject: "Kestra workflow failed for the flow {{flow.id}} in the namespace {{flow.namespace}}"
    htmlTextContent: "Failure alert for flow {{ flow.namespace }}.{{ flow.id }} with ID {{ execution.id }}"

yaml
id: send_email
namespace: company.team

inputs:
  - id: attachments
    type: ARRAY
    itemType: JSON

tasks:
  - id: send_email
    type: io.kestra.plugin.notifications.mail.MailSend
    from: hello@kestra.io
    to: hello@kestra.io
    attachments: {{ inputs.attachments | toJson }}

yaml
id: send_email
namespace: company.team

inputs:
  - id: embedded_image_uri
    type: STRING

tasks:
  - id: send_email
    type: io.kestra.plugin.notifications.mail.MailSend
    from: hello@kestra.io
    to: hello@kestra.io
    embeddedImages:
      - name: kestra.png
        uri: "{{ inputs.embedded_image_uri }}"
        contentType: image/png

yaml
id: export_audit_logs_csv
namespace: company.team

tasks:
  - id: ship_audit_logs
    type: "io.kestra.plugin.ee.core.log.AuditLogShipper"
    lookbackPeriod: P1D
    logExporters:
      - id: file
        type: io.kestra.plugin.ee.core.log.FileLogExporter

  - id: convert_to_csv
    type: "io.kestra.plugin.serdes.csv.IonToCsv"
    from: "{{ outputs.ship_audit_logs.outputs.file.uris | first }}"

  - id: send_email
    type: io.kestra.plugin.notifications.mail.MailSend
    from: hello@kestra.io
    to: hello@kestra.io
    username: "{{ secret('EMAIL_USERNAME') }}"
    password: "{{ secret('EMAIL_PASSWORD') }}"
    host: mail.privateemail.com
    port: 465 # or 587
    subject: "Weekly Kestra Audit Logs CSV Export"
    htmlTextContent: "Weekly Kestra Audit Logs CSV Export"
    attachments:
      - name: audit_logs.csv
        uri: "{{ outputs.convert_to_csv.uri }}"
        contentType: text/csv

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: 0 10 * * 5
Properties
Default 10000
Default SMTPS
Possible Values
SMTPSMTPSSMTP_TLSSMTP_OAUTH2