:tocdepth: 3 :py:mod:`gws.plugin.email_helper` ================================= .. py:module:: gws.plugin.email_helper .. autoapi-nested-parse:: Email sending helper. **Source code:** :source:`gws.plugin.email_helper` Package Contents ---------------- .. py:class:: Config(*args, **kwargs) Bases: :py:obj:`gws.Config` Mail helper settings .. py:attribute:: mailFrom :type: str :value: '' Default 'From' address. .. py:attribute:: smtp :type: SmtpConfig SMTP server configuration. .. py:exception:: Error Bases: :py:obj:`gws.Error` GWS error. .. py:class:: Message(*args, **kwargs) Bases: :py:obj:`gws.Data` Email message. .. py:attribute:: bcc :type: str Bcc addresses. .. py:attribute:: html :type: str HTML content. .. py:attribute:: mailFrom :type: str From address (default if omitted). .. py:attribute:: mailTo :type: str To addresses, comma separated. .. py:attribute:: subject :type: str Subject. .. py:attribute:: text :type: str Plain text content. .. py:class:: Object Bases: :py:obj:`gws.Node` Configurable GWS object. .. py:attribute:: mailFrom :type: str .. py:attribute:: smtp :type: _SmtpServer .. py:method:: configure() Configuration hook. .. py:method:: send_mail(m: Message) .. py:class:: SmtpConfig(*args, **kwargs) Bases: :py:obj:`gws.Config` SMTP server configuration. (added in 8.1) .. py:attribute:: host :type: str SMTP host name .. py:attribute:: login :type: str :value: '' Login .. py:attribute:: mode :type: SmtpMode :value: 'ssl' Connection mode. .. py:attribute:: password :type: str :value: '' Password. .. py:attribute:: port :type: int :value: 0 SMTP port. .. py:attribute:: timeout :type: gws.Duration :value: 30 Connection timeout. .. py:class:: SmtpMode Bases: :py:obj:`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 any ``Enum``-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 standard ``Enum``. .. py:attribute:: plain :value: 'plain' .. py:attribute:: ssl :value: 'ssl' .. py:attribute:: tls :value: 'tls'