Skip to content

Sendemail

flowtask.components.SendEmail

SendEmail

SendEmail(loop=None, job=None, stat=None, **kwargs)

Bases: TemplateSupport, CredentialsInterface, FlowComponent

SendEmail

Renders a Jinja template per dataframe row and emails the output to the address in the configured to column.

Properties

credentials / account : dict (required) SMTP credentials (hostname, port, username, password). template : str (required) Path to a Jinja template (HTML or text). subject : str (required) Jinja-templated subject, rendered per-row. to : str (required) Dataframe column containing the recipient email address. attachments : list[str] (optional) File paths or globs. Masks/globs supported via Flowtask masks. masks : dict (optional) Flowtask masks (applied to subject, template path and attachments).

Input: pandas.DataFrame (or list[dict]); Output: original input (pass-through).

expand_path

expand_path(filename)

Expand a (possibly masked) filename that may include globs (~, *, ?).