%PDF- %PDF-
| Direktori : /proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/salt/modules/ |
| Current File : //proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/salt/modules/smtp.pyo |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z e j
e � Z e
Z y: d d l Z d d l Z d d l Z d d l Z e Z Wn e k
r� n Xd Z d � Z d d d d d d d d d � Z d S( u�
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
i ( t absolute_importt unicode_literalst print_functionNu smtpc C@ s t r
t St d f S( uG
Only load this module if smtplib is available on this minion.
u2 This module is only loaded if smtplib is available( t HAS_LIBSt __virtualname__t False( ( ( s5 /usr/lib/python2.7/site-packages/salt/modules/smtp.pyt __virtual__D s u Message from Saltu Truec
C@ s� | rd t d | � }
|
j d � } |
j d � } |
j d � } |
j d � } |
j d � } n | r� t j j j � } | j t j j j | � � n t j j j | � } | | d <| | d <| | d <g | j d
� D] } | j
� ^ q� }
y1 | d k rt j | � } n t j
| � } Wn'