Send Gmail programmatically using Auth Cookie

I would like to implement something similar to the solution presented in this question , which allows the application to send emails without using ACTION_SEND Intent. However, instead of asking the user for their gmail credentials, I would rather use the AccountsManager class to allow access to the google account with one-click approval.

I am familiar with how to get the auth token / cookie when a user allows access to their account, but what I can’t find information (if at all possible) is how to authenticate and send email, given that auth cookie, not username and password. Any information on how to do this / if even possible would be greatly appreciated. Thanks in advance.

+6
source share
1 answer

Since my post above was deleted and I cannot restore it, I am not sure if the edited answer is visible. So, I duplicate it here.


Here is a project that allows you to connect to GMail using OAuth authentication:

http://code.google.com/p/google-mail-xoauth-tools/

I did not have the opportunity to try it, but at least you can start work in the right direction. Will hope.

0
source

Source: https://habr.com/ru/post/905422/


All Articles