{"id":18657857,"url":"https://github.com/iagsdc/oauth2_client_gmail_plugin","last_synced_at":"2025-11-05T22:30:22.845Z","repository":{"id":238621674,"uuid":"797019707","full_name":"iagsdc/oauth2_client_gmail_plugin","owner":"iagsdc","description":"Drupal 10 module designed as a plugin to the OAuth2 Client module to enable access to GMail. Also requires the PHPMailer SMTP module ","archived":false,"fork":false,"pushed_at":"2024-10-12T22:10:14.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T15:12:41.093Z","etag":null,"topics":["drupal-10","gmail","oauth2-client","phpmailer","plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iagsdc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-07T03:36:10.000Z","updated_at":"2024-10-12T22:10:17.000Z","dependencies_parsed_at":"2024-11-07T07:43:42.829Z","dependency_job_id":null,"html_url":"https://github.com/iagsdc/oauth2_client_gmail_plugin","commit_stats":null,"previous_names":["iagsdc/oauth2_client_gmail_plugin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iagsdc%2Foauth2_client_gmail_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iagsdc%2Foauth2_client_gmail_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iagsdc%2Foauth2_client_gmail_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iagsdc%2Foauth2_client_gmail_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iagsdc","download_url":"https://codeload.github.com/iagsdc/oauth2_client_gmail_plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239475960,"owners_count":19645041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drupal-10","gmail","oauth2-client","phpmailer","plugin"],"created_at":"2024-11-07T07:30:03.511Z","updated_at":"2025-11-05T22:30:22.812Z","avatar_url":"https://github.com/iagsdc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"NOTE:  earlier versions of this code had issues regarding the email address used to\nsign in to Google and to send email from Drupal.  That issue has been resolved; the\naddress used is the Email address entered on the 'Basic site settings' page.\n\nThis module is a plugin for the OAuth2 Client module, and also requires the PHPMailer SMTP \nmodule. It provides authentication to Google Workspace Gmail via OAuth2.  \n\nIMPORTANT:  This module requires the Google league/oauth2-google module, available at \nhttps://oauth2-client.thephpleague.com/providers/league/.  It should be installed in\nyour vendor directory.\n\nTo install this module, place it in the /oauth2_client/modules directory.  If this\nis the first or only plugin installed for oauth2_client, you may have to create\nthe 'modules' directory.\n\nBefore using this module, it is necessary to set up a Client ID and Client Secret\non Google.  Here is how to do that as of April, 2024, and configure this module:\n\n1.  Sign in to your Google Workspace account.  The username of the Google account must \n    be your site email address, entered in Drupal on the 'Basic site settings' page\n    (/admin/config/system/site-information).\n\n2.  Go to https://console.cloud.google.com/.\n\n3.  At the top left of the page next to \"Google Cloud\", there should be a projects dropdown. \n    Click on it.\n\n4.  If you have no projects listed in the 'Select a resource' dialog box, create one,\n    then select it as your current project.\n\n5.  Click on 'APIs \u0026 Services', a large button somewhere in the center of the page.\n\n6.  Click on Credentials in the menu that appears on the left-hand side of the page.\n\n7.  Click on CREATE CREDENTIALS, then select 'OAuth client ID'.\n\n8.  Select 'Web application' for Application Type.\n\n9.  Name your credentials, and note your Client ID and Client Secret.  You will need to \n    enter these values in (11) below.\n\n10. The 'Authorized redirect URI' for your site will be:\n\n```\n\thttps://yoursite.com/oauth2-client/phpmailer_plugin/code\n```\n    Replace \"yoursite.com\" with your site domain.\n\n11. In Drupal, go to Configuration-\u003eSystem-\u003eOAuth2 Clients (/admin/config/system/oauth2-client).\n    You should see this plugin (PHPMailer Gmail Oauth2).  Enable it, then press Edit.  Enter your\n    Client ID and Client Secret in the boxes indicated.  Press 'Save'. \n\n12. After you've saved your Google credentials, press the 'Save and request token' button\n    to redirect from your site to Google, then follow the instructions on Google. When you\n    log in to Google, you need to log into the account that has your Drupal site email address\n    for its username.  \n\n    When you're done, Google should issue a Refresh Token and redirect back to the Drupal page you \n    just left.  If everything worked, the token will be saved and you should be ready to send email.\n\nA few other setup items:\n\n1.  Don't forget to go to the Mail module to select 'PHPMailer SMTP' as your mail Formatter and \n    Sender (/admin/config/system/mailsystem).\n\n2.  If you have other modules such as Commerce 2 that send mail, you may need to add them at the \n    bottom of the same page in (1) above.\n\n3.  On the PHPMailer SMTP transport settings page, select 'Gmail OAuth2 Client' as your SMTP \n    authentication type (/admin/config/system/phpmailer-smtp).  Set the SMTP port to 587, and \n    select TLS as the secure protocol.  Under Advanced SMTP setting, uncheck Verify peer and\n    Verify peer name.\n\nYou can use the 'Test configuration' service on the PHPMailer SMTP transport settings page to verify that\nthe new configuration is working by sending a test email.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiagsdc%2Foauth2_client_gmail_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiagsdc%2Foauth2_client_gmail_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiagsdc%2Foauth2_client_gmail_plugin/lists"}