Added example block for the "SMTP username and password"
This commit is contained in:
parent
57be6d7ac4
commit
b01c2cee66
1 changed files with 10 additions and 0 deletions
|
@ -116,6 +116,16 @@ EXAMPLES = '''
|
|||
# Example playbook sending mail to root
|
||||
- local_action: mail msg='System {{ ansible_hostname }} has been successfully provisioned.'
|
||||
|
||||
# Sending an e-mail using Gmail SMTP servers
|
||||
- local_action: mail
|
||||
host='smtp.gmail.com'
|
||||
port=587
|
||||
username=username@gmail.com
|
||||
password='mysecret'
|
||||
to="John Smith <john.smith@example.com>"
|
||||
subject='Ansible-report'
|
||||
msg='System {{ ansible_hostname }} has been successfully provisioned.'
|
||||
|
||||
# Send e-mail to a bunch of users, attaching files
|
||||
- local_action: mail
|
||||
host='127.0.0.1'
|
||||
|
|
Loading…
Reference in a new issue