Skip to main content

prefect_email.credentials

Credential classes used to perform authenticated interactions with email services

Classes

SMTPType

Protocols used to secure email transmissions.

SMTPServer

Server used to send email.

EmailServerCredentials

Block used to manage generic email server authentication. It is recommended you use a Google App Password if you use Gmail. Attributes:
  • username: The username to use for authentication to the server. Unnecessary if SMTP login is not required.
  • password: The password to use for authentication to the server. Unnecessary if SMTP login is not required.
  • smtp_server: Either the hostname of the SMTP server, or one of the keys from the built-in SMTPServer Enum members, like “gmail”.
  • smtp_type: Either “SSL”, “STARTTLS”, or “INSECURE”.
  • smtp_port: If provided, overrides the smtp_type’s default port number.
  • verify: If False, SSL certificates will not be verified. Default to True.
Methods:

get_server

get_server(self) -> SMTP
Gets an authenticated SMTP server. Returns:
  • An authenticated SMTP server.