Prefect Collection for interacting with email services in your flows: prefect-email

Docs

https://prefecthq.github.io/prefect-email/

Code

Examples

from prefect import flow
from prefect_email import EmailCredentials, email_send_message

@flow
def example_email_send_message_flow():
    email_credentials = EmailCredentials(
        username="username@email.com",
        password="password",
    )
    subject = email_send_message(
        email_credentials=email_credentials,
        subject="Example Flow Notification",
        msg="This proves email_send_message works!",
        email_to="someone@email.com",
    )
    return subject

example_email_send_message_flow()

1 Like