How to provide username and password of email account while using ansible mail module. I'm using gmail smtp server. In documentation of mail module nothing is mentioned about it.
I also came across an issue where username and password support was added through commit( maybe..I don't know how it works.). But I couldn't find username and password implementation for smtp in master source code [https:// github.com/ansible/ansible/blob/devel/library/notification/mail.](sorry..don't have enough rep to post 3 links)
Best Answer
The pull request you found has not (yet) been merged into mainline Ansible. It may be merged at some point in the future, but that is 100% up to the project maintainers.
Until then, you'll need to send SMTP to another host locally that can accept the mail without the need for authentication.