Take your e-commerce store further.

Using the right Magento 2 extension is more essential now than ever. With MagePal, you can rest assured that you are getting the best quality Magento extensions, each line of code are carefully crafted and rigorously tested. Spend less time debugging and more time doing what you do best with MagePal extensions!

Total Downloads Latest Stable Version GitHub stars GitHub forks

Google Gmail Oauth SMTP Extension

In this article, you will learn how to activate OAuth2 authentication in your Google account so that you can authenticate the Magento Mail SMTP plugin on your Magento Ecommerce site. By doing so, you can send emails from your Gmail or Google Workspace address using the plugin. The login details generated during this setup can also be utilized in other plugins that support OAuth2 authentication.

What is OAuth2?

OAuth2 (Open Authorization 2.0) is a standard protocol for authorization that allows users to grant limited access to their resources on one website or application (Gmail SMTP) to another website or application (Magento) without the need to share their username and password.

OAuth2 provides a secure and standardized way to delegate access to protected data, such as personal information or resources, from one application to another. It involves obtaining an access token from a third-party provider (SMTP Server), which can then be used to make API requests on behalf of the user, with the user’s permission.

Installation Guide

Step 1

  • Please log in to your MagePal account for information on how to access our private composer server.
composer require magepal/magento2-smtp-google-oauth
  • Download the extension
  • Unzip the file
  • Create a folder {Magento 2 root}/app/code/MagePal/SmtpGoogleOauth
  • Copy the content from the unzip folder

Step 2 - Enable Custom SMTP (“cd” to {Magento root} folder)

  php -f bin/magento module:enable --clear-static-content MagePal_SmtpGoogleOauth
  php -f bin/magento setup:upgrade

Google Tag Manager

Step 3 - How to Configure Magento SMTP

Log into your Magento 2 Admin

  1. Goto Stores
  2. Configuration
  3. MagePal
  4. SMTP Configuration
  5. Configure your SMTP setting

Step 4 - Extension Review

Like our extensions? Would you be kind enough to leave us a Google review? It only takes a minute and we’d be eternally grateful! Just click the link to go to our MagePal Google Business page and leave us your feedback.

Supported SMTP Providers

Integrate Magento 2 with Google Oauth SMTP provider, quickly and easily!

  • Gmail
  • Google App
  • G Suite
  • Google Workspace

How to update to the latest version

Step 1

composer update magepal/magento2-smtp-google-oauth
  • Download the latest version of our extension
  • Unzip the file
  • Create a folder {Magento 2 root}/app/code/MagePal/SmtpGoogleOauth
  • Copy the content from the unzip folder

Step 2 - Enable Custom SMTP (“cd” to {Magento root} folder)

  php -f bin/magento setup:upgrade

Configuring OAuth2 in your Google account

  1. Log into your Google Account and navigate to the following link console.developers.google.com/projectcreate to create a new Google Cloud Console project. Enter a project name and click **Create**. Setting up Oauth for Magento 2
  2. Enable Gmail API access using this link console.developers.google.com/flows/enableapi?apiid=gmail&credential=client_key&pli=1 Setting up Oauth for Magento 2
    Click "Next" to confirm the selected project and then click the "Enable" on the next page.
  3. From the left-hand hamburger menu, navigate to APIs & Services > Credentials Setting up Oauth for Magento 2
  4. Click on "Create Credentials" Setting up Oauth for Magento 2
  5. Select "Help me choose" from the dropdown menu. Setting up Oauth for Magento 2
  6. From the dropdown choose "Gmail API" and select the "User data" radio button Setting up Oauth for Magento 2

Related Extensions

Get more from your Magento2 store!

Catalog Hover Image for Magento

Quickly previewing alternative product images on your category list page.

Magento Enhanced E-commerce

If your are using Magento + Google Analytics, then you need Enhanced E-commerce for Google Tag Manager.

Enhanced Success Page

Add cross-sell, upsell, related products, social media links and other elements to your order confirmation.

0

Total Downloads

11

years experience with Magento

30+

Magento / Adobe Commerce Extensions

Shop with confidence

With millions of downloads worldwide, install with confidence knowing that our extensions will just work.

Prepare for the future with Google Analytics 4

Is your Magento store ready for the future? Say hello to the new Google Analytics 4, which is built from the ground up with all-new features and advanced machine learning technology.

Learn More