I need to send emails through my java web app and found this post which does the same. However, it requires to enter the password directly to the source code which I do not want to do.
I also want to commit and push the code on github. I could remove my password from the code before commiting but I would have to do that every time I commit.
I looked into Google Gmail API and OAuth for a secure way but couldn't understand their documentation.
Please suggest any secure way to enter password? or a quickstart to use Gmail API for sending emails through a web app would also be appreciated.