I'm working on a CRM application where all the staff users have a GMail account which is under a same domain. I'm the admin of this domain. Before, I used a custom access for all GMail users in my CRM using IMAP in order to get all the e-mails sent and received by them. For that I asked their GMail passwords that are stored without any encryption in my DB (It's crappy I know). Now, I want to do the same work but with the Google GMail API, and I have some questions :
-Can I achieve what I want (list all the e-mails from GMail for every staff user and also send e-mails throug GMail using the GMail API and a given GMail account) ?
-I'm not sure but I've seen that it could be possible using a "service account" and domain-wide delegation of authority. If it's true, do I need to go through the OAuth 2.0 even when using a "service account" ? Can maybe anybody guide me on a tutorial or show me the workflow to achieve what I want please ? Best could be in PHP. Thanks in advance for reading me !