


K9mail has different colored notifications for different accounts. Probably the easier way but I'm not sure what it gives away in terms of privacy. Fairmail in addtion to above uses auth2 in which you authenticate with google to let it access your account. The link already contains a code, so it should work. K9mail uses SMPT, IMAP, POP type of authentication.

$accessToken = $oauth->getAccessToken($_GET) So it seems to be ok, but this page displays an error "Error: redirect_uri_mismatch: Redirect URI mismatch" when the next code is reached: Is the same Redirect URI configured in the apikey. This is the same link for the published page where the process started. Tracking the HTML source code for this 'grant access' page, this contains data that seems to be ok, for example: With your sample files, I have configured the apikey with the Redirect URI, run the sample, click the "Get Access Token" button, a login appears, grant access to the application name defined in the apikey, click in "Grant Access".
