%PDF- %PDF-
| Direktori : /proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/states/smtp.pyc |
�
���^c @@ sD d Z d d l m Z m Z m Z d � Z d d d d d � Z d S( um
Sending Messages via SMTP
==========================
.. versionadded:: 2014.7.0
This state is useful for firing messages during state runs, using the SMTP
protocol
.. code-block:: yaml
server-warning-message:
smtp.send_msg:
- name: 'This is a server warning message'
- profile: my-smtp-account
- recipient: admins@example.com
i ( t absolute_importt unicode_literalst print_functionc C@ s d t k r d St S( u?
Only load if the SMTP module is available in __salt__
u
smtp.send_msgu smtp( t __salt__t False( ( ( s4 /usr/lib/python2.7/site-packages/salt/states/smtp.pyt __virtual__ s u Truec
C@ s+ i | d 6i d 6d d 6d d 6} | d k rR | d k rR t | d <d | d <| St d rv d j | | � | d <| St d d
| d | d | d
| d | d | d | � } | rt | d <| r� d j | � } d j | | | � | d <q'd j | | � | d <n t | d <d j | | � | d <| S( u�
Send a message via SMTP
.. code-block:: yaml
server-warning-message:
smtp.send_msg:
- name: 'This is a server warning message'
- profile: my-smtp-account
- subject: 'Message from Salt'
- recipient: admin@example.com
- sender: admin@example.com
- use_ssl: True
- attachments:
- /var/log/syslog
- /var/log/messages
name
The message to send via SMTP
u nameu changesu resultu u commentu; Missing parameter sender or profile for state smtp.send_msgu testu Need to send message to {0}: {1}u
smtp.send_msgt messaget recipientt profilet subjectt sendert use_sslt attachmentsu , u/ Sent message to {0} with attachments ({2}): {1}u Sent message to {0}: {1}u"