salt.states.smtp

Sending Messages via SMTP

2014.7.0 新版功能.

This state is useful for firing messages during state runs, using the SMTP protocol

server-warning-message:
  smtp.send_msg:
    - name: 'This is a server warning message'
    - profile: my-smtp-account
    - recipient: admins@example.com
salt.states.smtp.send_msg(name, recipient, subject, sender, profile, use_ssl='True')

Send a message via SMTP

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
name
The message to send via SMTP