====== Magento 2 SMTP Extension – User Guide ====== ===== Extension context ===== This document provides a comprehensive guide for the Toweringmedia SMTP Extension for Magento 2. It is intended for store administrators and developers who want to configure and manage email delivery through SMTP instead of Magento’s default mail system. ===== Overview ===== The Toweringmedia SMTP Extension for Magento 2 offers a secure, reliable, and fully configurable email delivery solution. It replaces Magento’s default mail transport system with a robust SMTP-based system designed for enterprise-grade performance. This extension ensures that all transactional emails—such as order confirmations, invoices, shipments, and customer communications—are delivered efficiently and consistently. It supports a wide range of email service providers including Gmail, Google Workspace (G Suite), Outlook 365, Zoho Mail, Amazon SES, SendGrid, Mailgun, as well as any custom SMTP server. The extension is built with modern security standards in mind and supports advanced authentication mechanisms such as OAuth, ensuring compliance with current email provider requirements. ===== Key features ===== * Improved email deliverability and reduced spam issues * Reliable transactional email flow * Seamless integration with major email service providers * Detailed email logging and debugging support * Support for secure authentication methods (OAuth, TLS, SSL) * Easy configuration from Magento Admin panel ===== What this extension does ===== * Enhances inbox delivery rates by using trusted SMTP servers * Ensures reliable sending of order and customer notification emails * Allows direct integration with third-party email providers * Provides logging for tracking sent emails and troubleshooting issues * Supports modern security protocols to meet compliance standards ===== Installation ===== Please refer to the installation guide in the following article [[https://toweringmedia.com/installation|https://toweringmedia.com/installation]] ===== Setup SMTP extension with Gmail API ===== This section provides a step-by-step guide to configure the Magento 2 SMTP Extension using Gmail API with OAuth 2.0 authentication. ==== Step 1: Create a project in Google Cloud Console ==== - Log in to your Google Cloud Console - Click on the project selector and choose **New Project** - Enter a project name (e.g., SMTP Connector for Magento) - Click **Create** - Select the created project from the top navigation {{:magento2:extensions:screenshot-2026-03-30-090403-png-783_553--03-30-2026_09_08_am.png?400|}} ==== Step 2: Enable Gmail API ==== - Open the navigation menu - Go to **APIs & Services → Enabled APIs & Services** {{:magento2:extensions:towering-media-developer-chat-room-swatwik-ghorai-toweringmedia-com-towering-media-mail-03-30-2026_09_38_am.png?400|}} - Click **Enable APIs and Services** - Search for **Gmail API** - Select and click **Enable** {{:magento2:extensions:screenshot_2026-03-30_093957.png?400|}} {{:magento2:extensions:screenshot_2026-03-30_094051.png?400|}} ==== Step 3: Configure OAuth consent screen ==== - Navigate to **APIs & Services → Credentials** {{::apis-services-_-apis-services-_-smtp-connector-for-_-_-google-cloud-console-03-30-2026_01_41_pm_.png?400|}} {{:magento2:extensions:apis-services-_-apis-services-_-smtp-connector-for-_-_-google-cloud-console-03-30-2026_01_42_pm_.png?400|}} {{:magento2:extensions:screenshot_2026-03-30_142032_.png?400|}} - Click **Configure Consent Screen** - Click **Get Started** {{:magento2:extensions:screenshot_2026-03-30_094317.png?400|}} {{:magento2:extensions:screenshot_2026-03-30_094417.png?400|}} - Enter application name (e.g., SMTP) - Provide support email - Choose **Internal** as audience - Save configuration {{:magento2:extensions:screenshot_2026-03-30_094447_.png?400|}} ==== Step 4: Create OAuth client credentials ==== - Go to **Credentials** - Click **Create Credentials → OAuth Client ID** {{:magento2:extensions:screenshot_2026-03-30_094613.png?400|}} - Select **Web Application** - Enter a name (e.g., SMTP) {{:magento2:extensions:screenshot_2026-03-30_135112.png?400|}} - Add Authorized Redirect URI from Magento SMTP settings {{:magento2:extensions:screenshot_2026-03-30_095113.png?400|}} - Click **Create** - Copy Client ID and Client Secret {{:magento2:extensions:screenshot_2026-03-30_095430.png?400|}} ==== Step 5: Configure API scopes ==== - Navigate to **Data Access** - Click **Add or Remove Scopes** {{:magento2:extensions:screenshot_2026-03-30_095721.png?400|}} - Set rows to 100 - Select required scopes {{:magento2:extensions:screenshot_2026-03-30_095817.png?400|}} - Click **Update** - Click **Save** {{:magento2:extensions:screenshot_2026-03-30_095957.png?400|}} ==== Step 6: Configure SMTP settings in Magento Admin ==== - Log in to Magento Admin - Navigate to SMTP settings - Set SMTP Provider to **Gmail** - Enter Gmail email address - Set Authentication Method to **OAuth 2.0** - Enter Client ID and Client Secret - Save configuration and flush cache {{:magento2:extensions:screenshot_2026-03-30_100114.png?400|}} ==== Step 7: Authorize Gmail account ==== - Scroll to SMTP configuration section - Click **Authorize with Google** - Complete authentication in popup - Verify status shows: * OAuth is configured and authorized * Authorization Status: Authorized {{:magento2:extensions:screenshot_2026-03-30_100337.png?400|}} ==== Step 8: Verify email functionality ==== - Enter test email address - Send test email - Verify email delivery If the email is received, SMTP configuration is successfully completed. ===== Validation checklist ===== * Configuration saves without errors in Admin. * Expected storefront/admin behavior is present. * No critical PHP/JS errors occur during test flow. * Caches and static assets are refreshed after changes. ===== Troubleshooting ===== * **Feature missing**: verify module status, cache flush, and static-content deploy. * **Unexpected behavior**: retest with only required related modules enabled. * **Admin setting not applying**: verify config scope and clear cache. ===== Related Magento 2 docs ===== * [[magento2:extensions:start|Magento 2 extension index]] * [[start|Global docs home]]