This question must have been asked many times but I can't find a good solution.
I need to send an email from my app without user interaction. This: https://stackoverflow.com/a/2033124/1395697 is a pretty good way but there are some problems. If I create a new gmail address from which all the emails are sent:
- the password is hardcoded and due to google security you need to change the password often when emails are sent from many places around the world.
- all outgoing mails can be read from this gmail address, which isn't really user friendly in terms of privacy.
Especially the second point makes me feel like it would be the very best option if the email could be sent from the default mail address (the google play address) of the phone. Is this possible at all?
Maybe somehow with XOauth2? (I actually don't really understand what that is but it seems to go in the direction, or does it not?...)
Can you give me any ideas on how this can be done?
Thanks for your help