I need to send emails from an app. Until now I've used the JavaMail Api which works well but has some problems:
- I need to hardcode the password to the gmail account from which the mails should be sent, which obviously isn't great
- Google recently detected some "suspicious sign ins" (I don't know if this was actually some people who tried to access the account or just the normal sign ins from the app), but google forced me to change the password, which obviously made the app useless because it couldn't send emails anymore.
I don't want to always release an update just because I had to change the password.
So if you have any ideas on how to either:
make the hardcoded password pretty secure and preventing google from forcing me to change the password
or sending the emails some other way that doesn't need a hardcoded password (like through a http request but that doesn't really work because the server thinks I'm spamming around and blocks the webspace...)
Please help!