Skip to content

Examples Catalog

Below is a list of examples for prefect-email.

Credentials Module

Gets a GMail SMTP server through defaults.

from prefect import flow
from prefect_email import EmailServerCredentials

@flow
def example_get_server_flow():
    email_server_credentials = EmailServerCredentials(
        username="username@gmail.com",
        password="password",
    )
    server = email_server_credentials.get_server()
    return server

example_get_server_flow()