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

Hi there,

I’ve been looking at the documentation, but it seems that it can only be used with email services requiring only address and password/access-token.

Is there a way to use this with email servers that require additional configuration, such as SMTP address? This is the case for many businesses that have on premise email (yes, it is still a thing unfortunately).