Module for Sending Messages via SMTP
New in version 2014.7.0.
smtplib python module
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:
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:
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
salt.modules.smtp.
send_msg
(recipient, message, subject='Message from Salt', sender=None, server=None, use_ssl='True', username=None, password=None, profile=None)¶Send a message to an SMTP recipient. Designed for use in states.
CLI Examples:
smtp.send_msg 'admin@example.com' 'This is a salt module test' profile='my-smtp-account'
smtp.send_msg 'admin@example.com' 'This is a salt module test' username='myuser' password='verybadpass' sender="admin@example.com' server='smtp.domain.com'
Generated on February 03, 2020 at 00:04:54 UTC.
You are viewing docs for the previous stable release, 2018.3.5. Switch to docs for the latest stable release, 2019.2.3, or to a recent doc build from the master branch.
© 2020 SaltStack. All Rights Reserved, SaltStack Inc. | Privacy Policy