File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/smtp.cpython-310.pyc
o
�N�g#
� @ sf d Z ddlZddlZddlZddlmZ zddlZdZW n ey' dZY nw e� e
�Zdd� ZdS )a�
Return salt data via email
The following fields can be set in the minion conf file:
smtp.from (required)
smtp.to (required)
smtp.host (required)
smtp.port (optional, defaults to 25)
smtp.username (optional)
smtp.password (optional)
smtp.tls (optional, defaults to False)
smtp.subject (optional, but helpful)
smtp.gpgowne' (optional)
smtp.fields (optional)
smtp.content (optional)
There are a few things to keep in mind:
* If a username is used, a password is also required. It is recommended (but
not required) to use the TLS setting when authenticating.
* You should at least declare a subject, but you don't have to.
* The use of encryption, i.e. setting gpgowner in your settings, requires
python-gnupg to be installed.
* The field gpgowner specifies a user's ~/.gpg directory. This must contain a
gpg public key matching the address the mail is sent to. If left unset, no
encryption will be used.
� N)�
formatdateTFc C s� d}i }|D ]
}|� |d�||<