NotificationConfig#
- class rapidtools.gui.NotificationConfig(smtp_host: str = '', smtp_port: int = 587, smtp_user: str = '', smtp_password: str = '', smtp_from: str = '', smtp_ssl: bool = False, public_url: str = '')[source]#
Bases:
objectWhere notifications are sent from.
- Variables:
smtp_host (str) – SMTP relay; empty disables email.
smtp_port (int) – Relay port.
smtp_user (str) – Login, empty for an open relay.
smtp_password (str) – Password for
smtp_user.smtp_from (str) – Sender address; defaults to
smtp_user.smtp_ssl (bool) – Use implicit TLS (port 465) instead of STARTTLS.
public_url (str) – The link put in messages; the server fills it with its own address when empty.
Example
>>> cfg = NotificationConfig.from_env({'RAPIDTOOLS_SMTP_HOST': 'mail.x.org'}) >>> cfg.smtp_host, cfg.smtp_port ('mail.x.org', 587)
Methods
Read the
RAPIDTOOLS_SMTP_*variables, then applyoverrides.