gws.helper.email
¶
Email sending helper.
Source code: gws.helper.email
Package Contents¶
- class gws.helper.email.Config(*args, **kwargs)¶
Bases:
gws.Config
Mail helper settings
- mailFrom: str = ''¶
Default ‘From’ address.
- smtp: SmtpConfig¶
SMTP server configuration.
- class gws.helper.email.Message(*args, **kwargs)¶
Bases:
gws.Data
Email message.
- bcc: str¶
Bcc addresses.
- html: str¶
HTML content.
- mailFrom: str¶
From address (default if omitted).
- mailTo: str¶
To addresses, comma separated.
- subject: str¶
Subject.
- text: str¶
Plain text content.
- class gws.helper.email.Object¶
Bases:
gws.Node
Configurable GWS object.
- mailFrom: str¶
- smtp: _SmtpServer¶
- configure()¶
Configuration hook.
- class gws.helper.email.SmtpConfig(*args, **kwargs)¶
Bases:
gws.Config
SMTP server configuration. (added in 8.1)
- host: str¶
SMTP host name
- login: str = ''¶
Login
- password: str = ''¶
Password.
- port: int = 0¶
SMTP port.
- timeout: gws.Duration = 30¶
Connection timeout.
- class gws.helper.email.SmtpMode¶
Bases:
gws.Enum
Enumeration type.
Despite being declared as extending
Enum
(for IDE support), this class is actually just a simple object and intended to be used as a collection of attributes. It doesn’t provide anyEnum
-specific utilities.The rationale behind this is that we need
Enum
members (e.g.Color.RED
) to be scalars, and not complex objects as in the standardEnum
.- plain = 'plain'¶
- ssl = 'ssl'¶
- tls = 'tls'¶