MailSend
Send an automated email from a workflow
type: "io.kestra.plugin.notifications.mail.MailSend"
Send an email on a failed flow execution
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: [email protected]
to: [email protected]
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 }}"
YES
One or more 'Cc' (carbon copy) optional recipient email address. Use semicolon as delimiter to provide several addresses
Note that each email address must be compliant with the RFC2822 format
YES
The address of the sender of this email
YES
The email server host
YES
The optional email message body in HTML text
Both text and HTML can be provided, which will be offered to the email client as alternative contentEmail clients that support it, will favor HTML over plain text and ignore the text body completely
YES
The email server password
YES
The optional email message body in plain text
Both text and HTML can be provided, which will be offered to the email client as alternative contentEmail clients that support it, will favor HTML over plain text and ignore the text body completely
YES
YES
10000
YES
The optional subject of this email
YES
Email address(es) of the recipient(s). Use semicolon as delimiter to provide several email addresses
Note that each email address must be compliant with the RFC2822 format
YES
SMTPS
SMTP
SMTPS
SMTP_TLS
SMTP_OAUTH2
The optional transport strategy
Will default to SMTPS if left empty
YES
The email server username
YES
The name of the attachment (eg. 'filename.txt')
YES
An attachment URI from Kestra internal storage
YES
application/octet-stream
One or more 'Cc' (carbon copy) optional recipient email address(es). Use semicolon as a delimiter to provide several addresses
Note that each email address must be compliant with the RFC2822 format