Skip to main content

Email

Send email notifications.

Attributes

AttributeTypeDescription
recipientsTuple[str, ...]Email addresses for the "to" field.
ccTuple[str, ...] = ()Optional email addresses for the "cc" field.
bccTuple[str, ...] = ()Optional email addresses for the "bcc" field.
subjectstr = "Task {task.name} {run.phase}"Email subject template (supports template variables).
bodystr = "Task: {task.name}\nRun: {run.name}\nProject/Domain: {project}/{domain}\nPhase: {run.phase}\nDuration: {run.duration}\nDetails: {run.url}\n"Plain text body template (supports template variables).
html_bodyOptional[str] = nullOptional HTML body template (supports template variables) which, when provided, causes the email to be sent as multipart.

Constructor

Signature

def Email(
on_phase: Union[[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase), Iterable[[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase)]],
recipients: Tuple[str, ...],
cc: Tuple[str, ...] = (),
bcc: Tuple[str, ...] = (),
subject: str = 'Task {task.name} {run.phase}',
body: str = 'Task: {task.name}\nRun: {run.name}\n...',
html_body: Optional[str] = None
) - > null

Parameters

NameTypeDescription
on_phaseUnion[[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase), Iterable[[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase)]]ActionPhase(s) to trigger notification.
recipientsTuple[str, ...]Email addresses for the 'to' field.
ccTuple[str, ...] = ()Optional email addresses for the 'cc' field.
bccTuple[str, ...] = ()Optional email addresses for the 'bcc' field.
subjectstr = 'Task {task.name} {run.phase}'Email subject template.
bodystr = 'Task: {task.name}\nRun: {run.name}\n...'Plain text body template.
html_bodyOptional[str] = NoneOptional HTML body template.