File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/smtp.cpython-310.pyc
Back
o ;j� � @ s� d Z ddlZddlZddlZddlZe�e�ZdZ zddl ZddlZddl ZddlZdZ W n ey6 Y nw dZdd� Z dd d�ZdS ) a� Module for Sending Messages via SMTP .. versionadded:: 2014.7.0 :depends: - smtplib python module :configuration: This module can be used by either passing a jid and password directly to send_message, or by specifying the name of a configuration profile in the minion config, minion pillar, or master config. For example: .. code-block:: yaml my-smtp-login: smtp.server: smtp.domain.com smtp.tls: True smtp.sender: admin@domain.com smtp.username: myuser smtp.password: verybadpass The resourcename refers to the resource that is using this account. It is user-definable, and optional. The following configurations are both valid: .. code-block:: yaml my-smtp-login: smtp.server: smtp.domain.com smtp.tls: True smtp.sender: admin@domain.com smtp.username: myuser smtp.password: verybadpass another-smtp-login: smtp.server: smtp.domain.com smtp.tls: True smtp.sender: admin@domain.com smtp.username: myuser smtp.password: verybadpass � NFTZsmtpc C s t rtS dS )zG Only load this module if smtplib is available on this minion. )Fz2This module is only loaded if smtplib is available)�HAS_LIBS�__virtualname__� r r �E/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/smtp.py�__virtual__B s r �Message from Salt�Truec C s� |r!t d |�} | �d�}| �d�}| �d�}| �d�}| �d�}| r4tjj�� }|�tjj�|�� ntjj�|�}||d<