Created
May 24, 2017 10:08
-
-
Save sudheerchamarthi/2916f5568a5a1056bc7e7881471bc01f to your computer and use it in GitHub Desktop.
This Ansible is to Send an email using Google SMTP credentials
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################### | |
############### PREREQUISITE ################################# | |
## Make Sure that "Access for less secure apps has been turned on" in you Gmail account by following the below link | |
## LINK: https://myaccount.google.com/lesssecureapps | |
## If Not your email will not be delivered and you will recieve a Warning Notifcation like "Review blocked sign-in attempt" | |
--- | |
- name: Sending email | |
mail: | |
host: smtp.gmail.com | |
port: 465 | |
secure: always | |
username: [email protected] | |
password: YOURPASSWORD | |
from: [email protected] | |
to: [email protected] | |
cc: [email protected] | |
subject: SUBJECT | |
body: BODY OF THE EMAIL | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment